Insert a Web Form

When creating HTML content, you have the option to add web forms to collect customer data. You can add any database contact field, contact custom field, or survey question to the web form, letting you populate a contact record based on the submitted form.

A contact record is created each time a contact submits a form, unless any of the following occurs:
  • The email address is included in the form.
  • Cookies are set through a survey or campaign.
  • Che contact opens the form from a link in a mailing.
If an email address exists or the repeat visitor has a cookie set for the form, the contact record is updated rather than creating a new record. If email address sharing is enabled and the email address is shared by multiple contacts, the web form submission is associated with the contact deemed to be the best fit. See Email Address Sharing.

Also, if a contact submits a value for Organization Name (contacts.ma_org_name) in a web form, B2C Service searches existing organization records for a match. If a match is found, the contact is associated to the matching organization.

Note: There is no client-side validation when a web form is used in an email. For security reasons, most email clients disallow the submission of forms from email messages. Therefore, embedding a web form in the body of a mailing or survey invitation message can result in an extremely low submission rate. As an alternative, we recommend creating the web form in a served web page and including a link to the page in your message. See Edit Serve Web Page Attributes.

You can also insert standard HTML objects in the form, such as images and tables, and click and drag form elements into place through the HTML editor. When you finish the web form, you can add a Submit button with one click.

  1. From a document, click Web Form in the Forms section of the Toolbox.
    The web form section is added to the HTML content bordered by an orange dotted line.
  2. Insert the cursor in the web form section and click Form Field to insert a field.
    The Form Field window opens.
  3. Enter field information.

    Form Field Window

    Field/Option Description

    *Web Form Fields

    Select a database field from this list.

    Default Value

    Select this check box to add a default value for the field and then type or select the value from the text box.

    Required

    Select this check box to make the field required.

    Note: You must add your own visual indicator that the field is required (for example, *).

    Class

    Enter the class name you want to assign to the field. You must define the class in the HTML of your document by either using the <style> tag to define the class inline, or posting the class in a CSS file on your web server and referencing it with the <link> tag.

    Because few third-party mail clients consistently support CSS, you should use style attributes instead of CSS.

    Style

    Enter any style attributes you want to assign to the field in this text box. Style attributes define how the text appears, such as color and font (for example, color: red; font-weight: bold; font-style: italic).

    Label

    Enter a label for the field as you want it to display. The default label is the name of the web form field.

    Display As

    If an opt-in field or radio custom field is selected, select Radio Buttons or Check Boxes to select how to display the field in the web form.

    Note: Custom field masks are not enforced in web forms.
  4. Click OK to insert the field.
  5. To add a survey question, click Survey Question. The Survey Question window opens.
    1. Select a survey question from the Questions list.
    2. To create a question, click New Survey Question.
      A window opens where you can create a question. See How Questions Work.
    3. To show the question and the answer as two separate fields on the web form, select the Split Question and Answer Tag check box. This lets you control where the question and answer portions of the question display.
    4. Click OK to insert the question.
  6. Click Submit Button to add the Submit button to the web form.
    Note: You must include a Submit button with the form. If using your own HTML code, you must include the attributes used in the Submit button. Therefore, we recommend that you use the HTML editor to insert the Submit button. You can double-click the button to edit the button text, or switch to source mode to use advanced options such as using an image for the button.

Results:

After you add a web form to a document and serve the document in a campaign or survey, you can modify the URL of the web form page to include parameters to prefill one or more of the fields on the form.