Below is an example of adding a contact to a mailing list.
$Input -id'List12' -addtolist12'List12'
•-id’List12’ -- this parameter is used within the form actions section, and as a reference within the forms cascading style sheet (CSS) for web designer.
•-addtolist12 – the addtolist parameter is used to add the contact to the specified mass mailing list. To add the contact to a mass mailing campaign, use –addtocampaign. The number (e.g., 12 in this example) is the list or campaign ID found on the Mailing tab.
The addtolist and addtocampaign commands generate a check box for the user to click indicating they want to be added to this list.
Hiding the Check box
If you want the check box to be automatically checked and not displayed to the user, you can hide the input and use the following modification to your form to automatically check the box.
1. Add the following CSS entry into the HEAD of the form body to hide the paragraph in which you will place the list check box.
p.hide { display: none; }
2. Modify the form command to indicate the box is checked.
<form method="POST" name="myform" onSubmit="document.myform.list.checked = true;">
3. Enclose the actual check box for the list subscription within a hidden paragraph.
<p class="hide">$input -id'list' -addtolist1'CustomerList'$</p>
For an example form used to add a contact to a mailing list, see the Form Examples section of this user guide.