Adding newsletter form within web page

Discussion in 'Troubleshooting' started by djmweb, Nov 6, 2008.

  1. djmweb

    djmweb New Member

    Joined:
    Jun 14, 2007
    Messages:
    6
    Is it possible to add the newsletter sign up form from the newsletter.php page to within another web page? I would like to add the form to my side bar which would show on each page.
  2. billrinehart

    billrinehart New Member

    Joined:
    Sep 3, 2006
    Messages:
    10
    make a text link in your sidebar which open a new window linking to the newsletter.php page. that is what i'm going to do.
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Just copy the form part (variables) into the sidebar and post to newsletter.php.

    David
  4. hcb25

    hcb25 aMember Pro Customer

    Joined:
    May 19, 2008
    Messages:
    5
    can you be a bit more specific,

    so I add
    Code:
    <form method="post" name="newsletter" id="newsletter" action="{$smarty.server.PHP_SELF|escape}"
        onsubmit="return validateStandard(this);" >
    <table class="vedit">
    <tr><th>#_TPL_NEWSLETTER_SUBSCRIBE_TO_NEWSLETTERS#</th>
    <td>
    {foreach from=$threads_list item=tr}
    {if $tr.is_active}
    <input type="checkbox" name="tr[]" value="{$tr.thread_id}" 
    {if $threads[$tr.thread_id] eq '1'}checked="checked"{/if} />
    <strong>{$tr.title}</strong> <div class="small">{$tr.description}</div>
    <br />
    {/if}
    {/foreach}
    </td></tr>
    <tr>
        <th>#_TPL_NEWSLETTER_NAME#</th>
        <td>
        <input type="text" name="n" value="{$vars.n|escape}" size="40" />  
        </td>
    </tr>
    <tr>
        <th>#_TPL_NEWSLETTER_EMAIL#</th>
        <td><input type="text" name="e" value="{$vars.e|escape}" size="40" /></td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="a" value="add_guest" />
    <input type="submit" value="&nbsp;&nbsp;&nbsp;#_TPL_NEWSLETTER_DO_SUBSCRIBE#&nbsp;&nbsp;&nbsp;" />
    </form>
    then what else do I put into the web page?
  5. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You need to copy the form data info like this:
    (adding info about the newsletter you want to subscribe them to)

    Code:
    <form method="post" name="newsletter" id="newsletter" action="/amember/newsletter.php" >
    <table class="vedit">
    <tr><th>Choose Newsletters</th>
    
    <td>
    <input type="checkbox" name="tr[]" value="1" 
     />
    <strong>your thread</strong> <div class="small">your thread
    <br />
    </td></tr>
    <tr>
        <th>Name</th>
        <td>
        <input type="text" name="n" value="" size="40" />  
        </td>
    
    </tr>
    <tr>
        <th>Email</th>
        <td><input type="text" name="e" value="" size="40" /></td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="a" value="add_guest" />
    <input type="submit" value="&nbsp;&nbsp;&nbsp;Subscribe&nbsp;&nbsp;&nbsp;" />
    </form>
    
    David

Share This Page