Modify a regular Unsubscribe Form to generate a Global Opt-Out when a contact chooses to Unsubscribe from your list.
- Go to CONTACTS > SUBSCRIPTION FORM WIZARD.
- Select a List.
- From Generate select 'Unsubscribe Form'.
- Enter a Goto URL for the landing page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform welcome page.
- Enter an Error Landing Page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform error page.
- Click NEXT.
- Select the form code and paste into a text editor to customize the form further.
- Add the following line of code after the last hidden input and place the form code into your website:
<input type="hidden" id="global" name="global" value="1">
ExampleThe following is an example of how the form code will appear, where [siteURL] is the URL of your domain, [slid] is the special list id, [gotoURL] is the success Landing Page, and [errorURL] is the Error Landing Page.
<form action="http://[siteURL]/bin/listctrl" method="POST" name="unsubscribe_form">
<input type="hidden" id="slid" name="slid" value="[slid]" />
<input type="hidden" id="cmd" name="cmd" value="unsubscribe" />
<input type="hidden" id="goto" name="goto" value="[gotoURL]" />
<input type="hidden" id="errors_to" name="errors_to" value="[errorURL]" />
Email: <input type="text" id="email" name="email" size="25" />
<input type="submit" value="Unsubscribe" />
</form>
Once you have created a form, test it to ensure it is functioning as expected. To test your unsubscribe form:
- Login to your realm.
- Go to CONTACTS > SEARCH FOR CONTACT.
- Click ADD.
- Enter an Email address to create a test contact. Click the Subscription tab and select the list to test against, then click SAVE.
- Save the form as an .html file.
- Open the .html file in your browser.
- Fill the form fields with the test Email address, then submit the form.
- Login to your realm.
- Go to CONTACTS > SEARCH FOR CONTACT.
- Enter the Email address submitted above, then click SEARCH.
- Double click the contact record to view the details.
- Verify the subscription was removed in the Subscription tab and the Global Opt Out is selected.