Below is an example of adding a contact to a mailing campaign.
$input -addtocampaign1'Test Campaign' -id'campaign'$
•-id’campaign’ -- this parameter is used within the form actions section, and as a reference within the forms cascading style sheet (CSS) for the web designer. It is the ID for the HTML input and can be whatever you want.
•addtocampaign1'Test Campaign' – the addtocampaign parameter is used to add the contact to the specified mailing campaign. To add the contact to a mass mailing list, use –addtolist. The number (e.g., 1 in this example) is the 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 -addtocampaign1'Test Campaign' -id'campaign'$</p>
For an example form used to add a contact to a campaign, see the Form Examples section of this user guide.