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.
Creating a Form
Section titled “Creating a Form”- Navigate to Design Studio
- Go to Forms
- Click New > New Form
- Select the form template
- Give the form a name and click Create
Once created, the form editor will open where you can configure fields, layout, and behavior.
Adding Form Fields
Section titled “Adding Form Fields”Fields define the information that users will submit through the form.
To add a field:
- Open the Fields panel
- Drag a field into the form layout
- Configure the field properties
Common field types include:
| Field Type | Description |
|---|---|
| Text | Single-line input |
| Text Area | Multi-line input |
| Email address input | |
| Phone | Phone number input |
| Checkbox | Boolean option |
| Dropdown | Select from predefined options |
| Hidden Field | Captures data without user interaction |
Fields can also be mapped to Marketo lead fields, ensuring the submitted data is stored correctly in the database.
Field Configuration
Section titled “Field Configuration”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
Form Layout
Section titled “Form Layout”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.
Form Behavior
Section titled “Form Behavior”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.
Embedding a Form
Section titled “Embedding a Form”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.
Styling Forms
Section titled “Styling Forms”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.
Marketo Forms Best Practices
Section titled “Marketo Forms Best Practices”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’s and Don’ts
Section titled “Do’s and Don’ts”Keep forms simple
Section titled “Keep forms simple”✅ 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.
Validate user input
Section titled “Validate user input”✅ DO Use validation for fields such as email and phone numbers.
❌ DON’T Allow free text where a structured format is required.
Test before publishing
Section titled “Test before publishing”✅ 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...