Skip to content

Creating Marketo Forms

Marketo forms are used to collect information from visitors and convert them into leads. They can be embedded in landing pages, websites, or external applications and are directly connected to Marketo’s lead database.

Forms allow marketers to capture user data, trigger campaigns, and personalize the customer journey based on the submitted information.

For the complete reference on Marketo forms, see the official documentation.

  1. Navigate to Design Studio
  2. Go to Forms
  3. Click New > New Form
  4. Select the form template
  5. Give the form a name and click Create

Once created, the form editor will open where you can configure fields, layout, and behavior.

Fields define the information that users will submit through the form.

To add a field:

  1. Open the Fields panel
  2. Drag a field into the form layout
  3. Configure the field properties

Common field types include:

Field TypeDescription
TextSingle-line input
Text AreaMulti-line input
EmailEmail address input
PhonePhone number input
CheckboxBoolean option
DropdownSelect from predefined options
Hidden FieldCaptures data without user interaction

Fields can also be mapped to Marketo lead fields, ensuring the submitted data is stored correctly in the database.

Each field can be configured with additional options.

Common configurations include:

  • Label – The field name displayed to the user
  • Required – Makes the field mandatory
  • Default Value – Pre-populated value
  • Validation – Ensures the data format is correct

You can also control field visibility using rules.

For example:

  • show a field only if another field has a specific value
  • hide fields depending on user selections

The form editor allows you to visually control the layout.

Elements can be arranged into:

  • Rows
  • Columns
  • Sections

This makes it easier to structure complex forms while keeping them user-friendly.

Forms can trigger actions when submitted.

Typical behaviors include:

  • redirecting to a thank-you page
  • displaying a confirmation message
  • triggering Marketo campaigns
  • sending lead data to integrations

These actions are configured in the Form Settings panel.

Marketo forms can be embedded on external websites using the provided embed code.

In Terra projects, forms are wrapped inside a container with the class c--form-X.

This wrapper allows us to scope all form styles without affecting other Marketo forms on the page.

Example:

<div class="c--form-a">
<form id="mktoForm_1234"></form>
</div>
<script src="//app.marketo.com/js/forms2/js/forms2.min.js"></script>
<script>
MktoForms2.loadForm("//app.marketo.com", "XXX-XXX-XXX", 1234);
</script>

Replace:

  • XXX-XXX-XXX with your Marketo account ID
  • 1234 with the form ID.

This script loads the form dynamically from Marketo.

Forms can be styled using CSS.

Options include:

  • using the default Marketo theme
  • applying custom CSS
  • overriding styles on the host website

In Terra projects, forms are wrapped with a class c--form-X. All form styles should be scoped inside this wrapper to avoid affecting other forms.

Example:

.c--form-a {
.mktoForm {
input {
border-radius: 4px;
padding: 10px;
}
}
}

Be aware that styling may vary depending on where the form is embedded.

To ensure forms perform well and capture useful data:

  • keep forms short and simple
  • only ask for essential information
  • validate fields to prevent incorrect submissions
  • test forms across devices and browsers
  • verify form styles when browser autocomplete is applied
  • ensure forms trigger the correct campaigns

DO

Ask only for essential information such as name and email.

DON’T

Ask for excessive information that may discourage users from submitting the form.

DO Use validation for fields such as email and phone numbers.

DON’T Allow free text where a structured format is required.

DO Test the form submission flow and confirm leads appear correctly in Marketo.

DON’T Publish forms without verifying that submissions are captured properly.

Knowledge Check

Test your understanding of this section

Loading questions...