[how to] put a subscribe form on one of my website pages

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

bad form action

Postby ed.advertise » 1:54pm, Mon 05 May, 2008

i can't post links here, so i can't explain in better..
code doesn't display here full too..

the problem is, that the action form adress adds domain before the adress, where the subscribe pagge is..

help me, please
ed.advertise
phpLister
 
Posts: 14
Joined: 2:55pm, Wed 12 Mar, 2008

Postby H2B2 » 4:04pm, Mon 05 May, 2008

Not sure if I understood your question correctly, but when using the method described in this thread, you can easily change the form action by editing your custom code. It should look like this:
Code: Select all
<form method="post" action="http://www.your_domain.com/your_lists_dir/?p=subscribe" name="subscribeform">
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby ed.advertise » 7:58am, Wed 07 May, 2008

i have the adress in the form action right, but when i click the button to send it, it adds domain before the right adress.. if i try it local, on my pc, it works.. but online it is wrong. may it be some settings of hosting?

now i hope i can send links, so..

after clicking on send form it goes to http://asiavit.com/billig.cz/lists/?p=subscribe
(asiavit.com is page, where the form is)

instead of

http:///billig.cz/lists/?p=subscribe where the subscribe page is..

i would post a code here, but id doesn't display all.. only some tags.. :(
ed.advertise
phpLister
 
Posts: 14
Joined: 2:55pm, Wed 12 Mar, 2008

Postby H2B2 » 7:24am, Thu 08 May, 2008

Yes that is quite strange. I wonder whether it might have something to do with having the form embedded in Wordpress. You might check that by inserting the same form on a simple HTML page that isn't embedded in your Wordpress site.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby ed.advertise » 9:02am, Wed 14 May, 2008

it is not on embeded.. i have it on a simple page.. you can look, it is on http://asiavit.com/
i tried it on a total blank page only with a form and the problem was the same..
may it be a setting of serverhosting?
ed.advertise
phpLister
 
Posts: 14
Joined: 2:55pm, Wed 12 Mar, 2008

Postby ed.advertise » 11:09am, Wed 14 May, 2008

aaaargh, problem solved :) stupid mistake.. :roll:
i had a bad link in action. i had http:/ instead of http://

thank you for support and sorry for your lost time with my "case" :lol:
ed.advertise
phpLister
 
Posts: 14
Joined: 2:55pm, Wed 12 Mar, 2008

help

Postby Hitbear » 11:37am, Tue 20 May, 2008

im sorry im really lost i dont know what to do or where to go for the original question with this thread. I had what you have to do and i understand that but i dont know how to get there.
Hitbear
phpList newbie
 
Posts: 3
Joined: 11:17am, Tue 20 May, 2008

Postby H2B2 » 8:50pm, Tue 20 May, 2008

In my experience, the best thing to do in those rare cases, is to completely immerse yourself in the topic, read everything you can (starting with the docs of course), and then, by trial-and-error if need be, you're bound to hit Earth. It may take some time, but you should get there in the end. :wink:

On the other hand, you could also consider being a bit more specific when posting questions. For instance, did you follow all the steps exactly as described in the docs? If so, what exactly did go wrong.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby Hitbear » 2:52am, Mon 26 May, 2008

in my attachment there is my error message
Hitbear
phpList newbie
 
Posts: 3
Joined: 11:17am, Tue 20 May, 2008

neither wrok help required

Postby native » 1:00pm, Mon 26 May, 2008

i would prefer to have name and email feild on my website that automatically subscribe people without them havong to go to the phplist sign up. but right now i would be happiest just to get it working propally at all.

i originally tried to modify the html code generated by the php script, and came up with this:

Code: Select all
Sign up to the Native Spirit Newsletter.</p>
<form>
  <div> </div>
  <div>
    <table>
      <tr>
        <td><div>Name:</div></td>
        <td><input>
            <script>addFieldToCheck("attribute1","Name");</script></td>
      </tr>
      <tr>
        <td><div>Email:</div></td>
        <td><input>
            <script>addFieldToCheck("email","Email");</script></td>
      </tr>
      <tr>
        <td><div>Confirm Email </div></td>
        <td><input>
            <script>addFieldToCheck("emailconfirm","");</script></td>
      </tr>
      <tr>
        <td><span>
          <input>
        </span> <span>I prefer to receive emails in HTML format</span></td>
      </tr>
    </table>
    <input>
    <input>
  </div>
  <div>
    <div>
      <input>
    </div>
  </div>
  <p>
    <input>
    <span>_______________________________________________________</span></p>
  </form>
 
<div>

i loaded onto this page on my website:


native spirit festival

which is a com, not a couk,


(not allowed to post address of website until after 10 messages.)

unfortunately every time i try to try it out i get this message:

Method Not Allowed
The requested method POST is not allowed for the (###) /english/about


--------------------------------------------------------------------------------

Apache/1.3.41 Server at nativespiritfestival#com Port 80



so i tried inserting the code suggested in this post, trying out different advise along the way until i got some responce. What i have at the moment is this:

Code: Select all
<newsletter>

<script>
var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
return true;
}
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
</script>

<form>
  <p>Name:
    <input>
    <br>
    Email.:   
    <input>
    <br>
    <script>addFieldToCheck("email","Email Address");</script>
    <script>addFieldToCheck("attribute2","Name");</script>
    <input>
    <input>
    </p>
  </form>

<newsletter>

however this now takes me to the phplist subscribe page, because of problems with not confirming the email address entered ( there is only one email address feild).



i am quite happy with the first design,i just don't understand why it wont work, especially at the post method seems to be working for the second script.

However i would be equally happy with the second design, if i could get it to subscribe emediately.



please help me, i am very new to php, and this has left me perplexed.

Thank you
native
phpList newbie
 
Posts: 2
Joined: 12:37pm, Mon 26 May, 2008

Re: neither wrok help required

Postby H2B2 » 4:50pm, Mon 26 May, 2008

native wrote:however this now takes me to the phplist subscribe page, because of problems with not confirming the email address entered ( there is only one email address feild).
You'd first need to configure your subscribe page exactly as you'd want it to operate, before copying the form code and inserting/customizing it in you own web page.

So, you would need to edit your subscribe page through the phplist admin module, and select "Don't display email confirmation".
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby H2B2 » 4:53pm, Mon 26 May, 2008

Hitbear wrote:in my attachment there is my error message
Unfortunately attachments seem to have been disabled on this board. Try giving an exact account of the steps you took to get it working.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: neither wrok help required

Postby native » 11:45pm, Mon 26 May, 2008

H2B2 wrote:
native wrote:however this now takes me to the phplist subscribe page, because of problems with not confirming the email address entered ( there is only one email address feild).
You'd first need to configure your subscribe page exactly as you'd want it to operate, before copying the form code and inserting/customizing it in you own web page.

So, you would need to edit your subscribe page through the phplist admin module, and select "Don't display email confirmation".


Hi thank you for the advise, i tried that but it didn't work, i then tried adding a confirm email feild to your code. and i still keep being brought back to the php list sign up.

i then descided to give up and just edit the code for the subscribe page header and footer in phplist, and that hasn't worked at all.

please help if you can.

i can#t add the address but if you wanted to check it out iw would be at nativespiritfestival, then dot com not couk and the specific page would be forward slash english forward slash about dot htm


thank you
native
phpList newbie
 
Posts: 2
Joined: 12:37pm, Mon 26 May, 2008

Postby H2B2 » 12:49am, Tue 27 May, 2008

I suggest you use this method:
1. Customize the standard phplist generated subscribe page exactly as you want it to work. (see /Mailinglistenglish/?p=subscribe to check the results)
2. if you are satisfied with the standard subscribe page, then proceed with following each and every step exactly as described in the documentation: http://docs.phplist.com/CustomSubscribeForm

Keep in mind that every input field you have in your standard phplist generated form, must be present in your custom form. Otherwise phplist will find that it isn't receiving all data it expects to get, and will therefore redirect to the standard subscribe page.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby Hitbear » 3:02am, Tue 27 May, 2008

here is where the form is

www. easy big cash .com/ test.html

but i receive an error code when i try to subscribe to it.
Hitbear
phpList newbie
 
Posts: 3
Joined: 11:17am, Tue 20 May, 2008

PreviousNext

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 0 guests