[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.

Postby darkdante » 10:16am, Mon 16 Apr, 2007

hello!

i hope somebody can help me.

i customized the subscribe-page like h2b2 said in his post:
http://forums.phplist.com/viewtopic.php?p=22093#22093

many thanks to him at this point!

now i want to costumize 2 things:
-i want to redirect the user after the subscribe-button to an individual page.
the user should´nt see the window created by phplist.
i want only to show an simple window with "you have subscribe...please check your mails" printed after the user subscribe.

-i want to put an unsubscribe panel on my homepage where the user can put his e-mail in and unsubscribe for all newsletter.

can somebody provide me with some code to handle this please?

thank you.

darkdante
darkdante
phpLister
 
Posts: 8
Joined: 10:02am, Mon 16 Apr, 2007

Postby H2B2 » 10:51pm, Thu 19 Apr, 2007

For redirecting to a custom thank you page, you could take a look at these threads:
- http://forums.phplist.com/viewtopic.php?t=8940
- http://forums.phplist.com/viewtopic.php?p=24222
Or search the forum. There might be more...

EDIT - such as this post: http://forums.phplist.com/viewtopic.php?p=31100#31100
Last edited by H2B2 on 2:53am, Fri 11 May, 2007, edited 1 time in total.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby H2B2 » 10:55pm, Thu 19 Apr, 2007

mpettitt wrote:No difference
Hard to say what's wrong with your custom form. Have you tried Beanstalk's alternative on page 3 of this thread?
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby mpettitt » 9:30am, Wed 25 Apr, 2007

Not yet - been working on other things. I think it's the same problem as http://forums.phplist.com/viewtopic.php?t=9282 , but that hasn't got a solution either. I'm wondering if it is something to do with MySQL5 doing something weird, or else the form objecting to being on a different domain to the backend (custom form is for use on a number of sites, all of which run from the same server, and use a single PHPlist installation).
mpettitt
phpList newbie
 
Posts: 3
Joined: 1:42pm, Tue 10 Apr, 2007

Postby H2B2 » 1:02am, Fri 27 Apr, 2007

mpettitt wrote:or else the form objecting to being on a different domain to the backend (custom form is for use on a number of sites, all of which run from the same server, and use a single PHPlist installation).
I haven't any experience in using the form that way, so I can't say anything definitive on that as a possible cause.

On the other hand, I wonder whether you too are using a 'relative' instead of a 'full' url for the form action. Ref: http://forums.phplist.com/viewtopic.php?t=9282

EDIT: I just checked in your original post, and you are using a full url. So this can't be the cause.
Code: Select all
<form method="post" name="subscribeform" action="http://www.excelpublishing.co.uk/lists/?p=subscribe">
<input type=text name=email value="" size="40">
<input type=text name=emailconfirm value="" size="40">
<input type=radio name="htmlemail" value="0"  /></span>
<input type=radio name="htmlemail" value="1" checked /></span>
<input type=text name="attribute2"  class="attributeinput" size="40" value="">
<input type=text name="attribute3"  class="attributeinput" size="40" value="">
<input type="hidden" name="list[2]" value="signup">
<input type="text" name="VerificationCodeX" value="" size="20">
<input type=submit name="subscribe" value="Subscribe to the Selected Newsletters" onClick="return checkform();">
</form>
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

subscription form in a <div>

Postby moi » 4:38pm, Mon 11 Jun, 2007

I'm looking for something similar and not quite...

I'd like to use a modified subcription page taking full advantage of the user attributes and all of the phplist backend.

I've modified the css and minor layout hacks of the "provided" index.php?subscribe, and would like to place it in a <div> , and have the "confirm" page returned in that same <div>.

When accessing the subscription page "outside" of the div it works great as always, (been using phplist on multiple projects). But when accessing the subscription page from within a div, the submit action doesnot "check" the form and it redireccts to the "front page" of the site, without errors nor posting "sending" anything to the database ???


Does this all make sense ?

Thanks for any help in this matter.
moi
phpList newbie
 
Posts: 3
Joined: 7:53am, Sun 17 Dec, 2006

Having a problem too

Postby sublimeone » 1:29pm, Fri 22 Jun, 2007

I am having a similar problem configuring this page:
http://outerlandmv.com/onewslettersignup.php

I've tried to follow this thread closely but to no avail... I configure the code one way and after filling out the form I am redirected to the phplist form and then opted to submit...

or...

I fill out the info, submit and left with an empty form.. no "thank you" page or anything of the sort...

Any help is appreciated.
TIA
sublimeone
phpList newbie
 
Posts: 1
Joined: 1:25pm, Fri 22 Jun, 2007

Postby gspark » 10:09am, Tue 03 Jul, 2007

I don't get this

Code: Select all
<form method="post" action="http://www.yourdomain.com/lists/?p=subscribe&id=1"


all that action url will do is redirect you to the phplist form, that's not very custom if you ask me :)

how to process the form from the web page you put the form in
gspark
phpList newbie
 
Posts: 4
Joined: 10:05am, Tue 03 Jul, 2007

Postby Mike_R » 12:43pm, Tue 03 Jul, 2007

Sublimeone - Having just had a quick peer @ your page, I'd say you may be having problems with

Code: Select all
<form method="post" action="http://www.outerlandmv.com/lists/?p=subscribe&id=2" name="subscribeform">


and

Code: Select all
<input type="hidden" name="list[3]" value="signup"><input type="hidden" name="listname[3]" value="Newsletter"/>


The id=2 suggests that the list you're trying to subscribe people to is list 2, and the list[3] in the lower part suggests that you're subscribing to list 3. So you need to check in the admin backend which list you actually want. I'd then drop the "&id=2" from the <form> tag.

And quoting H2B2 from page #1
Also, check this setting on the configuration page (admin >> configure):
- if there is only one visible list, should it be hidden in the page and automatically subscribe users who sign up (0/1)
true
Mike_R
PL Geek
 
Posts: 88
Joined: 10:34am, Wed 30 May, 2007

Subscribe Form Not Working

Postby lwatkins » 1:37am, Fri 13 Jul, 2007

I've created a subscribe form, but experiences problems getting it to work the way I want.

First of all I can't get it to not go to subscribe page upon submitting.

Also, the name attribute keeps getting changed to a 1. If they enter their name and on the next page (the subscribe page I am hoping to avoid) it then says 1 in the field. I've checked the attribute and it doesn't have a default value.

Here is the code I have. If someone can spot a problem and suggest a fix I would greatly appreciate it.

Code: Select all
<form>
<table>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td><b><font>Email:</font></b></td>
    <td><input></td>
  </tr>
  <tr>
    <td><div><b>
    <font>Confirm eMail</font></b></div></td>
  <td>
  <input>
  <script>addFieldToCheck("emailconfirm","Confirm email");</script></td>
  </tr>
  <tr>
    <td>
        <span><font>
        <b><input></b></font></span><b><font>
        <span>I prefer to receive emails in HTML format</span></font></b></td>
  </tr>
  <tr>
    <td><b><font>First Name:</font></b></td>
    <td> <input></td>
  </tr>
</table>
<p>
<input>
</form>


Thanks!

Leisa
lwatkins
phpLister
 
Posts: 8
Joined: 6:03am, Thu 21 Jun, 2007

Postby H2B2 » 3:27am, Fri 13 Jul, 2007

Your code is truncated. Please edit your message, paste the code again, and make sure you click on "Disable HTML in this post" on the left of your editing window.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby lwatkins » 3:38am, Fri 13 Jul, 2007

Your code is truncated. Please edit your message, paste the code again, and make sure you click on "Disable HTML in this post" on the left of your editing window.


I just tried to edit the post but it said that I couldn't post because it contained a link, in any form, until I've been with the group for 7 days. I've been with it for longer than that. Is there an alternative?

I didn't even see the option of disabling HTML before. Thanks for pointing it out to me.

Leisa
lwatkins
phpLister
 
Posts: 8
Joined: 6:03am, Thu 21 Jun, 2007

Postby H2B2 » 3:43am, Fri 13 Jul, 2007

You could try placing spaces in the links, just to be able to post the code.

Alternatively, you could post a link (with spaces) to your subscribe page here.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Link

Postby lwatkins » 3:56am, Fri 13 Jul, 2007

I've tried editing the post with spaces and it still won't take it. Here is the page it is on:

yoursuccesstools dot com and is the front page.
lwatkins
phpLister
 
Posts: 8
Joined: 6:03am, Thu 21 Jun, 2007

Postby H2B2 » 4:29am, Fri 13 Jul, 2007

This is your form code:
Code: Select all
<form method="post" action="http://www.yoursuccesstools.com/responder/?p=subscribe" name="subscribeform" target="_self">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber1" width="272">

  <tr>
    <td width="239" colspan="2"></td>
  </tr>
  <tr>
    <td width="75"><b><font color="#FFFFFF" face="Arial Narrow">Email:</font></b></td>
    <td width="197"><input type="text" name="email" value = "" size="27"></td>
  </tr>
  <tr>

    <td width="75"><div class="required"><b>
    <font face="Arial Narrow" size="2" color="#FFFFFF">Confirm eMail</font></b></div></td>
  <td class="attributeinput" width="197">
  <input type=text name=emailconfirm value="" size="27">
  <script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","Confirm email");</script></td>
  </tr>
  <tr>
    <td colspan=2 width="239">

        <span class="attributeinput"><font face="Arial Narrow" color="#FFFFFF">
        <b><input type=checkbox name="htmlemail" value=""/></b></font></span><b><font face="Arial Narrow" size="2" color="#FFFFFF">
        <span class="attributename">I prefer to receive emails in HTML format</span></font></b></td>
  </tr>
  <tr>
    <td width="75"><b><font color="#FFFFFF" face="Arial Narrow">First Name:</font></b></td>
    <td width="197"> <input type="text" name="attribute2" value ="" size="27"></td>

  </tr>
</table>
<p>
<input type="submit" name="subscribe" value="Subscribe" />
</form>

This is the relevant part of your code:
Code: Select all
<form method="post" action="http://www.yoursuccesstools.com/responder/?p=subscribe" name="subscribeform" target="_self">
<input type="text" name="email" value = "" size="27">
<input type=text name=emailconfirm value="" size="27">
<input type=checkbox name="htmlemail" value=""/>
<input type="text" name="attribute2" value ="" size="27">
<input type="submit" name="subscribe" value="Subscribe" />
</form>

You seem to be missing this hidden input tag, where x represents the id-number of the list the user should be subscribed to:
Code: Select all
<input type="hidden" name="list[x]" value="signup">


On the configuration page, make sure this setting is set to "true" (or 1):
if there is only one visible list, should it be hidden in the page and automatically subscribe users who sign up (0/1) true

See also: http://docs.phplist.com/CustomSubscribeForm
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

PreviousNext

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests