Page 15 of 17

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

PostPosted: 4:47pm, Wed 30 Dec, 2009
by beanstalk
you could try this alternative if you are having trouble with the other method.

viewtopic.php?f=6&t=5712&hilit=beanstalk&start=30#p23247

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

PostPosted: 5:00pm, Wed 30 Dec, 2009
by chakar
Thanks for your answer, but I prefer the first method, with the JavaScript.
Can you not check the code please to see if there are some mistakes.

Thanks in advance for your help.

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

PostPosted: 9:22pm, Fri 02 Apr, 2010
by Etiennnne
Hello,

I'm trying to create a simple subscribe page (with only "mail" and "confirm mail" field), but when i click on the "Inscription" (= subscribe) button, I only have a white page.

http://www.alicegregorio.com/inscription.php

Where do you think the problem lies ?

Thanks,

Etiennnne

PS : sorry if my english is not correct.

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

PostPosted: 8:09pm, Fri 30 Jul, 2010
by lucianocrimi
I inserted the code form on my webpage but after subscription it doesn't return on the same page, it goes to .....lists/?p=subscribe&id=2 that is the page of phplist script. I would like to reopen the same page that contains the form. How can I do?

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

PostPosted: 9:49am, Thu 12 Aug, 2010
by acecarwash
Great workaround! I only have two questions:

1. How can i fix the unsubscription page to also use my own script?
2. The confirm page breaks out of my window (Joomla) how can i fix it to open in the same window?
Code: Select all
Go to "admin/subscribelib2.php" line 338 and replace
$thankyoupage = $subscribepagedata["thankyoupage"];
with
$thankyoupage = header( 'Location: http://www.mywebsite.com/subscribe.html' );


FIXED question 2 by adding the page also into Joomla, so only question 1 is remaing

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

PostPosted: 10:19am, Thu 12 Aug, 2010
by acecarwash
Here is my working Joomla subscription ! I use mailinglist numer two!

Why must i give a id with the following line:
<form method="post" action="../lists/?p=subscribe&amp;id=3" name="subscribeform">

If I use

<form method="post" action="../lists/?p=subscribe" name="subscribeform">

The confirm page won't work

AND can i also put my own * ERROR * page for example if my email adress doesent match?

My Joomla article code (Subscription):
Code: Select all
<p> </p>
<form method="post" action="../lists/?p=subscribe&amp;id=3" name="subscribeform">
<table style="text-align: left; width: 484px; height: 281px;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="height: 47px;" align="undefined" valign="undefined"><span style="font-size: 10pt;"><span style="color: #000080;"><small>Email Adres</small></span></span></td>
<td style="height: 47px;" align="undefined" valign="undefined">
<p><span style="color: #f0f0f0;"> </span></p>
<p><span style="color: #f0f0f0;"><input name="email" type="text" /> </span><span style="color: #f0f0f0;"> </span></p>
</td>
</tr>
<tr>
<td style="height: 47px;" align="undefined" valign="undefined"><span style="font-size: 10pt;"><span style="color: #000080;"><small>Confirm Email Adres</small></span></span></td>
<td style="height: 47px;" align="undefined" valign="undefined">
<p><span style="color: #f0f0f0;"> </span></p>
<p><span style="color: #f0f0f0;"><input name="emailconfirm" type="text" /> </span><span style="color: #f0f0f0;"> </span></p>
</td>
</tr>
<tr>
<td style="height: 47px;" align="undefined" valign="undefined"><span style="font-size: 10pt;"><span style="color: #000080;"><small>Name</small></span></span></td>
<td style="height: 47px;" align="undefined" valign="undefined">
<p><span style="color: #000080;"> </span></p>
<p><span style="color: #000080;"><input name="attribute1" type="text" /> </span><span style="color: #000080;"> </span></p>
</td>
</tr>
<tr>
<td style="height: 47px;" align="undefined" valign="undefined"><span style="font-size: 10pt;"><span style="color: #000080;"><small>Lastname</small></span></span></td>
<td style="height: 47px;" align="undefined" valign="undefined">
<p><span style="color: #000080;"> </span></p>
<p><span style="color: #000080;"><input name="attribute2" type="text" /> </span><span style="color: #000080;"> </span></p>
</td>
</tr>
<tr>
<td style="width: 261px; height: 122px;" colspan="2" align="undefined" valign="undefined"><span style="color: #f0f0f0;"><input name="list[2]" value="signup" type="hidden" /></span>
<div style="text-align: center;"><span style="color: #f0f0f0;"><input name="subscribe" value="Subscribe" onclick="return checkform();" type="submit" /></span></div>
</td>
</tr>
</tbody>
</table>
</form>
<p><span style="color: #f0f0f0;"><a href="../lists/?p=unsubscribe&amp;id=3">Unsubscribe</a></span></p>
<span style="color: #f0f0f0;"> </span>


My Joomla article code (Subscription Confirm):
Code: Select all
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<title>SubscribeStage2.html</title>
<div style="text-align: left;"><big style="font-weight: bold;"><big><span style="font-family: MS Sans Serif; color: #df0101;">You're Almost Done - Activate Your Subscription!</span></big></big><br style="font-family: MS Sans Serif;" /></div>
<br style="font-family: MS Sans Serif;" /> <small><span style="font-family: MS Sans Serif;"><span style="font-size: 10pt;"><span style="font-family: verdana,geneva;"><span style="color: #000080;">You've just been sent an email that contains a confirm link.<br /><br /> In order to activate your subscription.  Check your email and click on the link in that email.  You will not receive your subscription until you click that link to activate it.<br /><br /> If you don't see that email in your inbox shortly, fill out the form again to have another copy of it sent to you.</span></span></span> <br /> </span></small>


My phpLIST Confrim patch
Code: Select all
   # personalise the thank you page
   if ($subscribepagedata["thankyoupage"]) {
     /* $thankyoupage = $subscribepagedata["thankyoupage"]; */
    $thankyoupage = header( 'Location: http://www.MYSITE.nl/site/index.php?option=com_content&view=article&id=219' ) ;
   }


My phpLIST list
Code: Select all
Nr     Naam     Volgorde     Functies     Actief     Eigenaar     
2   MailingList
259 Leden       bewerk | bekijk leden | verwijder       admin


My Confirm email
Code: Select all
  Almost welcome to our newsletter(s) ...

  Someone, hopefully you, has subscribed your email address to the following newsletters:
 
 
 * MailingList

  If this is correct, please click the following link to confirm your subscription.
  Without this confirmation, you will not receive any newsletters.
 
 
http://www.MYSITE.nl/lists/?p=confirm&uid=16a22bdf6MODIFED06a6696a4342a6
 
  If this is not correct, you do not need to do anything, simply delete this message.

  Thank you

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

PostPosted: 6:35am, Mon 16 Aug, 2010
by create
Can someone update this code for the new version of phplist? The new version now requires the user to input the email twice to confirm, but I don't want to have the user to input the email twice. Just once and when it is submitted to the phplist subscribe page it will also do the confirm email.

thanks.

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

PostPosted: 9:59am, Mon 23 Aug, 2010
by acecarwash
create wrote:Can someone update this code for the new version of phplist? The new version now requires the user to input the email twice to confirm, but I don't want to have the user to input the email twice. Just once and when it is submitted to the phplist subscribe page it will also do the confirm email.

thanks.


See also my code !:

My Joomla article code (Subscription):

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

PostPosted: 10:21am, Mon 23 Aug, 2010
by acecarwash
Hello

Somebody know how to modify the Goodby info page wenn removing yourself from the list?

My Script:
Code: Select all
<br /> <form method="post" action="../lists/?p=unsubscribe&amp;id=3" name="unsubscribe">
<table>
<tbody>
<tr>
<td>Vul een geldig e-mailadres in:</td>
<td colspan="3"><input name="unsubscribeemail" size="40" type="text" /></td>
</tr>
<tr>
<td>Reden:</td>
<td colspan="3"><input name="unsubscribereason" size="40" type="text" /></td>
</tr>
</tbody>
</table>
<input name="unsubscribe" value="Volgende" type="submit" /></form>

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

PostPosted: 12:44am, Wed 25 Aug, 2010
by ELMIT
A couple of days I read that thread, but I cannot find it. I am sure it is just "that" to change.

I have the following code on Facebook:
Code: Select all
<script language="Javascript" type="text/javascript">

function checkform() {
  for (i=0;i<fieldstocheck.length;i++) {
    if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].type") == "checkbox") {
      if (document.subscribeform.elements[fieldstocheck[i]].checked) {
      } else {
        alert("Please enter your "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
        return false;
      }
    }
    else {
      if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
        alert("Please enter your "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
        return false;
      }
    }
  }
  for (i=0;i<groupstocheck.length;i++) {
    if (!checkGroup(groupstocheck[i],groupnames[i])) {
      return false;
    }
  }
 
  if(! compareEmail())
  {
    alert("Email Addresses you entered do not match");
    return false;
  }
  return true;
}

var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name) {
  fieldstocheck[fieldstocheck.length] = value;
  fieldnames[fieldnames.length] = name;
}
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name) {
  groupstocheck[groupstocheck.length] = value;
  groupnames[groupnames.length] = name;
}

function compareEmail()
{
  return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
function checkGroup(name,value) {
  option = -1;
  for (i=0;i<document.subscribeform.elements[name].length;i++) {
    if (document.subscribeform.elements[name][i].checked) {
      option = i;
    }
  }
  if (option == -1) {
    alert ("Please enter your "+value);
    return false;
  }
  return true;
}

</script>

<form action="http://elmit.gotdns.org/websites/lists/?p=subscribe&id=1 method=post name="subscribeform">

<table border=0>
  <tr><td><div class="required">Email</div></td>
  <td class="attributeinput"><input type=text name=email value="" size="40">
  <script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script></td></tr>
  <tr><td><div class="required">Confirm your email address</div></td>
  <td class="attributeinput"><input type=text name=emailconfirm value="" size="40">
  <script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","Confirm your email address");</script></td></tr><tr><td colspan=2>
        <span class="attributeinput"><input type=checkbox checked="true" name="htmlemail" value="1"  /></span>
        <span class="attributename">I prefer to receive emails in HTML format</span></td></tr>

<tr><td><div class="required">First Name</div></td><td class="attributeinput">
            <input type=text name="attribute9"  class="attributeinput" size="40" value=""><script language="Javascript" type="text/javascript">addFieldToCheck("attribute9","First Name");</script></td></tr>

<tr><td><div class="required">Last Name</div></td><td class="attributeinput">
            <input type=text name="attribute10"  class="attributeinput" size="40" value=""><script language="Javascript" type="text/javascript">addFieldToCheck("attribute10","Last Name");</script></td></tr>

<tr><td><div class="required">Country</div></td><td class="attributeinput">
            <input type=text name="attribute7"  class="attributeinput" size="40" value=""><script language="Javascript" type="text/javascript">addFieldToCheck("attribute7","Country");</script></td></tr>

<tr><td><div class="required">City</div></td><td class="attributeinput">
            <input type=text name="attribute6"  class="attributeinput" size="40" value=""><script language="Javascript" type="text/javascript">addFieldToCheck("attribute6","City");</script></td></tr>

<tr><td><div class="required">Subscribe Date mmddyyyy</div></td><td class="attributeinput">
            <input type=text name="attribute3"  class="attributeinput" size="40" value="01012010"><script language="Javascript" type="text/javascript">addFieldToCheck("attribute3","Subscribe Date mmddyyyy");</script></td></tr>

<tr><td><div class="required">Send this user HTML emails</div></td><td class="attributeinput">
            <input type="hidden" name="list[1]" value=signup>
            <input type=text name="attribute1"  class="attributeinput" size="40" value="1"><script language="Javascript" type="text/javascript">addFieldToCheck("attribute1","Send this user HTML emails");</script></td></tr>
</table><p>
Please select the newsletters you want to sign up to:</p><ul class="list">

<li class="list"><input type="checkbox" name="list[14]" value=signup  /><b>RA-Customers Global</b><div class="listdescription"><input type=hidden name="listname[14]" value="RA-Customers Global"/>This mailing list is for RA customers world wide. It should help to keep them informed about all news regarding Rich-Ads. Participants are subscribed and confirmed initially by ELMIT.</div></li>

<li class="list"><input type="checkbox" name="list[15]" value=signup  /><b>Free Energy</b><div class="listdescription"><input type=hidden name="listname[15]" value="Free Energy"/>We all dream of free energy, but is it possible? Why or why not? Some people report success. We want to talk about them.</div></li>

<li class="list"><input type="checkbox" name="list[16]" value=signup  /><b>Law of Attraction</b><div class="listdescription"><input type=hidden name="listname[16]" value="Law of Attraction"/>The Law of Attraction is a natural law and it is unmutable. Success is determined how we learn to use the Law of Attraction to our benefit.</div></li>

<li class="list"><input type="checkbox" name="list[17]" value=signup  /><b>Emotional Freedom Techniques</b><div class="listdescription"><input type=hidden name="listname[17]" value="Emotional Freedom Techniques"/>The Chinese people know it already 5,000 years that Accupunctor can open blocked energy channels in our body. EFT is "accupunctor without needles" and a "placebo without swallowing".</div></li></ul><div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20"></div><p>

<input type=submit name="subscribe" value="Subscribe to the Selected Newsletters" onClick="return checkform();"></p>
    </form></p>


If a user fills out the form on Facebook, he will be send to my site, with partial filled out the form.
I was expecting that this form would be replaced with the form on Facebook.
What am I missing?

bye
Ronald

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

PostPosted: 6:49pm, Fri 03 Sep, 2010
by Numelo
Hello all,

I´m really sorry for coming up with this problem again but after trying several tips and tricks from the documentation and this thread I still don´t know what´s my mistake.
The situation is as follows: I created a new default subscription page and copied the source code (script and form) to integrate it in an existing subscribe page of our online shop. Therefore I followed the instructions in the documentation here: http://docs.phplist.com/CustomSubscribeForm, but when I´m hitting the submit button on our own subscribe page I keep getting redirected to the default phplist subscription page with the fields filled in the data I entered already on our shop subscribe.php. After hitting the submit button again I correctly receive the thank you page, but of course I don´t want this intermediate step with the phplist default page.
Additional information: There´s only one list available and the "only one visible list" value is set to true.
I hope somebody can help me to solve this problem. If necessary I can post the complete code of our own subscribe.php.

Thank you in advance,
Numelo

Code: Select all
<script language="Javascript" type="text/javascript">

function checkform() {
  for (i=0;i<fieldstocheck.length;i++) {
    if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].type") == "checkbox") {
      if (document.subscribeform.elements[fieldstocheck[i]].checked) {
      } else {
        alert("Bitte geben Sie ein "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
        return false;
      }
    }
    else {
      if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
        alert("Bitte geben Sie ein "+fieldnames[i]);
        eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
        return false;
      }
    }
  }
  for (i=0;i<groupstocheck.length;i++) {
    if (!checkGroup(groupstocheck[i],groupnames[i])) {
      return false;
    }
  }
 
  return true;
}

var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name) {
  fieldstocheck[fieldstocheck.length] = value;
  fieldnames[fieldnames.length] = name;
}
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name) {
  groupstocheck[groupstocheck.length] = value;
  groupnames[groupnames.length] = name;
}

function compareEmail()
{
  return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
function checkGroup(name,value) {
  option = -1;
  for (i=0;i<document.subscribeform.elements[name].length;i++) {
    if (document.subscribeform.elements[name][i].checked) {
      option = i;
    }
  }
  if (option == -1) {
    alert ("Bitte geben Sie ein "+value);
    return false;
  }
  return true;
}

</script>

<form method="post" action="http://dev.numelo.com/lists/?p=subscribe" name="subscribeform">

<style type="text/css">
      div.adminmessage {
        width: 100%;
        border: 2px dashed #000000;
        padding: 10px;
        margin-bottom: 15px;
        background-color: #E7BE8F;

      }
</style>
     
<!-- div class="adminmessage">
<p><b>You are logged in as administrator (admin) of this phplist system</b></p><p>You are therefore offered the following choice, which your users will not see when they load this page.</p><p><a href="/lists/admin">Go back to admin area</a></p>
<p><b>Please choose</b>:
   <br/><input type=radio name="makeconfirmed" value="1"> Make this user confirmed immediately
    <br/><input type=radio name="makeconfirmed" value="0" checked> Send this user a request for confirmation email </p>
</div -->

  <tr>
     <td class="mainPaddedText">
       <div class="required"><?php echo (TEXT_ANREDE); ?></div>
    </td>
    <td class="attributeinput">
    <!--0--><select name="attribute2" class="attributeinput"><option value="1" >Herr<option value="2" >Frau<option value="3" >Mr.<option value="4" >Mrs.</select>
    </td>
  </tr>

  <tr>
     <td class="mainPaddedText">
       <div class="required"><?php echo (TEXT_VORNAME); ?></div>
    </td>
    <td class="attributeinput">
        <input type=text name="attribute3"  class="attributeinput" size="40" value="">
      <script language="Javascript" type="text/javascript">addFieldToCheck("attribute3","Vorname");</script>
    </td>
  </tr>

  <tr>
     <td class="mainPaddedText">
       <div class="required"><?php echo (TEXT_NACHNAME); ?></div>
    </td>
    <td class="attributeinput">
        <input type=text name="attribute4"  class="attributeinput" size="40" value="">
      <script language="Javascript" type="text/javascript">addFieldToCheck("attribute4","Nachname");</script>
    </td>
  </tr>
 
  <tr>
     <td class="mainPaddedText">
       <div class="required"><?php echo (TEXT_MAIL); ?></div>
    </td>
     <td class="attributeinput">
       <input type=text name=email value="" size="40">
        <script language="Javascript" type="text/javascript">addFieldToCheck("email","E-Mail");</script>
    </td>
  </tr>
 
  <tr>
     <td class="mainPaddedText">
       <div class="required">E-Mail best&auml;tigen</div>
    </td>
     <td class="attributeinput">
        <input type=text name=emailconfirm value="" size="40">
        <script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","E-Mail best&auml;tigen");</script>
    </td>
  </tr>
 
  <tr>
     <td>&nbsp;</td>
  </tr>
 
  <tr>
     <td colspan=2 class="mainPaddedText">
   <input type="checkbox" name="attribute6" value="on"  class="attributeinput">
   <span class="attributename"><?php echo (TEXT_DISCLAIMER); ?></span>
    </td>
  </tr>

  <tr>
    <td align="left" valign="bottom" class="mainPaddedText"><?php echo (TEXT_PFLICHT); ?></td>
    <td align="right">
    <p>
    <input type=image name="subscribe" src="includes/languages/english/images/buttons/button_anmelden.gif" width="100" height="32" border="0" alt="Anmelden" title="Anmelden" style="border:none;" onClick="return checkform();">
    </p>
    </td>
  </tr>
</table>

<input type="hidden" name="list[1]" value="signup">
<!-- input type="hidden" name="listname[1]" value="Numelo Newsletter" / -->

<div style="display:none">
<input type="text" name="VerificationCodeX" value="" size="20">
</div>

</form>

<!-- p><a href="http://www.numelo.com/lists/?p=unsubscribe&id=3">Abmelden</a></p -->

</div>

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

PostPosted: 10:40am, Thu 30 Sep, 2010
by mobstaralex
Hi,

I'm using the code to make the thank you page pop up in a new window but can't seem to get it working. I get a popup window, but the thank-you page appears in the main page.

My code:
Code: Select all
<form method="post" action="http://xxx/?p=subscribe&id=5" name="subscribeform" onsubmit="window.open('', this.target,
'dialog,modal,scrollbars=no,resizable=no,width=550,height=300,left=0,top=0');">
                  <h3>Email (required)</h3>
                    <input class="input-box"type=text name=email value="" size="40">
                    <script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script>
                    <input type=hidden name="htmlemail" value="1">
                    <input type="hidden" name="list[6]" value="signup">
                    <input type="hidden" name="listname[6]" value="xxx"/>
                  <div style="display:none">
                    <input type="text" name="VerificationCodeX" value="" size="20">
                  </div>
                  <p>
                    <input class="submit-button" type=submit name="subscribe" value="Add me!" onClick="return checkform();">
                  </p>
                </form>


Hope this hasn't been covered before...

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

PostPosted: 10:45am, Thu 30 Sep, 2010
by mobstaralex
.... Apparently
Code: Select all
target="windowName"
had left my code somehow. Silly me!

One-click registering

PostPosted: 2:28pm, Fri 29 Oct, 2010
by erawlins
I have a list that keeps no attributes except the email address itself. I would like to include on an existing page on my site a little box that says "enter email here" and a submit button. I tried building it according to the Custom Subscribe Form instructions, but it sends me to the standard subscribe page, where I have to re-enter the email address, and then leaves me looking at a standard acknowledgment page. I would like the user to click the Submit button on my page and get a confirmation message directly, on my page, without ever seeing a PHPList page. Possible?

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

PostPosted: 11:15pm, Mon 01 Nov, 2010
by ckay840
Hi, phplist is an amazing script! Thanks guys, its just what I need for visitors to my website.

However....I've run into one small problem. I need help embedding the subscription form to my website. I need it fully customizable.

Here I provided an example of where its located within my site. The width in characters is 20. I want it to also popup with a custom thank you for subscribing page.

Image

This would help me greatly,thanks in advance for anyone taking a minute to help me with the code. Cheers