Create Web Forms for Landing Pages
    • 1 Minute to read
    • Dark
      Light

    Create Web Forms for Landing Pages

    • Dark
      Light

    Article summary

    Landing Pages make it easy to create, edit, and manage informative landing pages (web sites) that complement and extend your email marketing campaigns.

    In addition to providing information, landing pages can also include web forms to collect data from visitors - for example, encouraging visitors to subscribe to a newsletter or participate in a drawing for a certain prize by providing personal data.

    Example​ for Integration

    Web forms can be directly integrated into the HTML code of the landing page.

    The following example shows how a web form for a subscription to a newsletter can be integrated into a landing page.

    We recommend using a REST interface (API) with the method self subscription. For more information, see ​IP Restriction​.

    Example

    <form action="<%InsertLPLink id="70"%>"/>
    	<label for="name">First name:</label>
    	<input name="user_firstname" required="" type="text" value="<%${user['FirstName']}%>"/>
    	<label for="name">Last name:</label>
    	<input name="user_lastname" required="" type="text" value="<%${user['LastName']}%>"/>
    	<label for="email">Email:</label>
    	<input name="pemail" required="true" type="email" value="<%${user['Email']}%>"/>
    	<button class="submit" type="submit">Subscribe</button>
    	<!-- HIDDEN FORM FIELDS -->
    	<input name="action" type="hidden" value="updateRecipient"/>
    	<input name="gid" type="hidden" value="1500162371"/>
    	<input name="self" type="hidden" value="true"/>
    	<input name="errorPage" type="hidden" value="<%InsertLPLink id="71"%>"/>
    </form>

    To add a field for a mobile number, use "pmobilenum" instead of "pemail". The attribute placeholder is <% ${user['MobileNumber']} %>.

    Explanation of the Example​

    • Input fields:
      You can define different fields for the web form that the user should fill out. According to the input fields, attribute names must be defined as placeholders so that the input can be assigned to the newly created user profile.

    • Engage placeholders:

      Input Name

      Attribute placeholder

      user_firstname

      <%${user['FirstName']}%>

      user_lastname

      <%${user['LastName']}%>

      pemail

      <%${user['Email']}%>

      action

      updateRecipient

      self

      true

      errorPage


      According to the input fields, attribute names must be defined as placeholders so that the input can be assigned to the newly created user profile.

    • Placeholders for Landingpage: To use the above example on an actual landing page, these items must be customized as follows:

      Item

      Customization

      Placeholder

      Landing Page

      Replace the Landing Page on which the web form is to be created.

      <%InsertLPLink id="70"%>

      Group ID

      Replace ​gid​ with the group ID of the group for which the web form is being created.

      1500162371

      Redirects

      Replace the Landing Page to which a user is redirected if errors occurred when entering information.

      <%InsertLPLink id="71"%>


    Was this article helpful?