Sending and Hosting Forms

Add forms to your campaigns using a form link or host them on your website with the form URL.

Static and pre-filled forms

A static form is one you would host on your website using the Form URL. When a user looks at the form, all the fields will be blank, allowing them to fill in their details.

A pre-filled form would be used within a campaign. These forms will pre-fill with contact data based on the table fields associated to the form. For example, you may include a link to a preference centre form with recipient data pre-filled so they can update their preferences.

Tip: add javascript to pre-filled forms to protect the pre-filled data.

For each field that you want protected, put the following code in the JS text area in the form settings (using the element name and ID found in the Element Overview) .

Copy
document.getElementById('amf-input-[element_name]_[id]').disabled = true;

Once applied, form fields will be greyed out and uneditable.

Adding forms to your campaigns

Add your form to a campaign by:

Using form links in the email editor

In the email editor:

  1. Open the Email Tools menu.

  2. Select the Form Link option.

  3. Select your form in the pop-up window.

Any contacts using the form will have any relevant data pre-filled.

Note: the Form Link is available for Textline, Text Box, HTML Box, and Link URL attributes.

Tip: putting a form link in the URL field of a Link attribute allows you to change the link text displayed in the campaign.

Using form links in the HTML editor

In the HTML Editor:

  1. Press the form link button.

  2. select your form.

The editor automatically inserts a link to the form iin the format [*form.link(id)*].

Adding form links manually

Enter the relevant form's unique ID into your mailing using:

  • [*form.link_ssl(id)*] to insert a selectable https link to the form.

  • [*form.link_url_ssl(id)*] to insert just the text for the https URL.

  • [*form.link_url(id)*] to insert just the text for a http URL.

Tip: each form is listed with the ID displayed in the left hand column on the Forms tab.

Hosting a form

Once an email element has been added to a form, the Form URL and the Download options will be available in the Form Overview.

  • Form URL - copy-and-paste this link into either your website code or a campaign.

  • Form download - download the form to place on your webpage.

    • The Styled Form link will download the form and the template.

    • The Unstyled Form link will just download the form. The form will be a static form containing default values.

Note: the downloaded form does not contain any validation code.

Validation for the form must be incorporated into your website in a similar manner to when creating a bespoke form.