How to code forms for landing page templates

You can configure landing page forms that collect data from your customers and store that data in the Deliver tracking tables.

The HTML template for the landing page must include a fully defined <form> tag with all required attributes, including the name attribute. Without a name attribute that is specified for the form, you cannot configure the submit function from the landing page.

Two ways to configure inputs (form fields)

While the form must be defined, the inputs (fields) for the form can be defined in either of the following two ways:

  • Option 1: Define both the form and all the inputs (form fields) completely in the HTML template. With this option, you would also create a droppable area for the submit option. When people use this template, they check input values to fields and configure the submit option, but they do no additional formatting of the form fields.
  • Option 2: Define the framework of the form in the HTML template. You create and name the form. However, rather than create the <inputs> for the fields, you configure droppable areas for the field inputs. Create one droppable area for each form field and droppable areas for the submit and cancel functions. When people use the template to create a landing page, they use the Form Field Radio button and check box that is surrounded by dotted line rectangle image widget to construct the HTML for the <input> tags.

Droppable areas for the submit function

The submit function in a landing page form is managed with a hyperlink to another landing page. Therefore, the HTML template must contain a droppable area that provides a way to access to the submit function.

Example form templates

The following template creates a form with all the inputs defined (option 1).

<form id="mailingPrefs" name="mailingPrefsForm" method="post" action="">
<p><strong>Please update your mailing preferences:</strong>
  </p>
  <p>&nbsp;</p>
     <p>Would you like to receive offers through email messages?
     Yes
     <input name="optInEmail" type="radio" value="true" id="optInEmailYes"/>
     No
     <input name="optInEmail" type="radio" value="false" id="optInEmailYes"/>
</p><br />
    <p>Would you like to receive offers through the mail?
    Yes
    <input name="optInDirectMail" type="radio" value="true" 
id="optInDirectMailYes"/>
    No
    <input name="optInDirectMail" value="false" type="radio" 
id="optInDirectMailNo"/></p><br />

     <p>Would you like to receive offers through text messages?
     Yes
     <input name="optInSMSText" type="radio" value="true" 
id="optInSMSTextYes"/>
     No
     <input name="optInSMSText" type="radio" value="false" 
id="optInSMSTextYes"/></p><br />

 </form>

<p><span id="SubmitForm" class="droppable">
[configure Submit Form here]
</span></p> 
<p><span id="CancelForm" class="droppable">
[configure Cancel here]
</span></p>