Form Tags

  Dealing with all of the form tags in NP Subscriber PRO can be confusing. If you would rather skip all of this section of the manual, you should download the Form Generator plugin. This plugin will create subscription forms for you, and will save you quite a bit of time. But, you should still get to know the form tags at least to some degree. This page doesn't cover slot or group tags.

  Here is an HTML fragment that shows all of the form tags (again, disregarding slots and groups):

<form action=http://localhost/cgi-bin/list/subscriber.cgi method=post>
Email Address : <input type=text size=20 name=address><BR>
Name : <input type=text size=20 name=name><BR>
Mailing Address : <input type=text size=20 name=address_m1><BR>
City, State & ZIP : <input type=text size=20 name=address_m2><BR>
Country : <input type=text size=20 name=country><BR>
Phone Number : <input type=text size=20 name=phone><BR>
<font size=-1>
<input type=checkbox name=list1 value=my_list> My Mailing List<BR>
<input type=checkbox name=list2 value=my_list2> My Mailing List 2<BR>
<input type=hidden name=checks value=yes>
<input type=radio checked name=html value=no>Plain Text<BR>
<input type=radio name=html value=yes>HTML<BR><BR>
<input type=radio checked name=action value=subscribe>Subscribe<BR>
<input type=radio name=action value=unsubscribe2>Unsubscribe<BRgt;
<input type=submit value=Submit>
  The input boxes are rather self-explanatory. They are: email, name, address_m1, address_m2, country, and phone number. You may wish to specify your own slots to break down the mailing address fields even more.

  • Checkboxes
  •   The above form allows visitors to un/subscribe from the two lists that are listed there. They can choose both, or just one. That's the freedom that checkboxes give you. Note the hidden field "checks." This MUST be included if you're using checkboxes. This way the script reads in incoming data as coming from checkboxes, not as a set list (which is addressed next). For each checkbox, the "name" must be list[number] as is shown above. So, if you had 5 different lists, you'd have name=list1 through name=list5 with the value being the DIRECTORY of the list. If you don't want to use checkboxes, you could have this:

    <input type=hidden name=lists value=my_list,my_list2,>

      This forces the person to be un/subscribed to the lists that you specify. Note: Even if you only list one list, the "name" must be "lists" and not just "list." The script uses "list" for another variable in the script itself.

  • HTML Choices
  •   What if you don't want to give your subscribers the option of subscribing to HTML and plain text versions? If you don't include the radio buttons for HTML, then they're subscribed as plain text subscribers by default. However, you can make the script subscribe them as HTML subscribers without having them select it by using this field:

    <input type=hidden name=html value=yes>
      This will force them to be subscribed to the HTML newsletter and whenever you send out HTML, they'll receive it. Remember that you can also force the script to send HTML messages to plain text subscribers.

    Above all else: remember that form tags are CaSe SENsitIVe.

    Back to Index