Layout Template Form Code
The contents of the form tab is inserted into the %%content%% tag of your layout template.
Required Editions
| Available in: All Account Engagement Editions |
Beginning
- <form accept-charset="UTF-8" method="post" action="%%form-action-url%%" class="form" id="pardot-form">
- Marks the beginning of the main element. Ends at
</form>and contains all form code. - %%form-opening-general-content%%
-
Controlled by opening general content of the landing page, if applicable. Displays whether the form or thank you content is displayed.
Thank You Content
- %%form-if-thank-you%%
- Marks the beginning of the thank you section.
- %%form-javascript-focus%%
- Focuses page on thank you content (in case it is below the scroll line).
- %%form-thank-you-content%%
- Controlled from Step 4 of the Form wizard Completion Actions, Thank You Content tab.
- %%form-thank-you-code%%
- Controlled from Step 4 of the Form wizard Completion Actions, Thank You Code tab.
- %%form-end-if-thank-you%%
- Marks the end of the thank you section.
Form Content
- %%form-if-display-form%%
- Marks the beginning of the form content section.
- %%form-before-form-content%%
- Populates content from Step 3 of the Form wizard Look and Feel, Above Form tab.
- %%form-if-error%%
- Marks the beginning of the form’s error message.
- <p class="errors">Please correct the errors below:</p>
- Text content for form error message.
- %%form-end-if-error%%
- Marks the end of the form error message.
- %%form-start-loop-fields%%
- Runs all code between %%form-start-loop-fields%% and %%form-end-loop-fields%% for each field on the form.
- <p class="form-field %%form-field-css-classes%%
- Populates CSS classes added to the field.
- %%form-field-class-required%%
- Adds the required class on a required field.
- %%form-field-class-hidden%%
- Adds the hidden class on a hidden field.
- %%form-field-class-no-label%%
- Adds the no-label class on a field without a label a label.
- %%form-field-class-error%%">
- Adds the error class on a field that fails validation on submission.
- %%form-if-field-label%%
- Marks the start of field label section.
- <label class="field-label" for=" %%form-field-id%%">
- Field ID.
- %%form-field-label%%</label>
- Field label.
- %%form-end-if-field-label%%
- Ends the field label section.
- %%form-field-input%%
- Field input area.
- %%form-if-field-description%%
- Marks the beginning of the field description section, if applicable.
- <span class="description">%%form-field-description%%</span>
- Field description text.
- %%form-end-if-field-description%%</p>
- Marks the end of the field description section, if applicable.
- <div id="error_for_%%form-field-id%%" style="display:none"></div>
- Field ID.
- %%form-field-if-error%%
- Starts the field error message section, if applicable.
- <p class="error no-label">%%form-field-error-message%%</p>
- Error message for the field.
- %%form-field-end-if-error%%
- Ends the field error message section.
- %%form-end-loop-fields%%
- Ends the %%form-loop-fields%% section.
- %%form-spam-trap-field%%
- Bot protection. This field appears only to bots.
- <!-- forces IE5-8 to correctly submit UTF8 content --><input name="_utf8" type="hidden" value="☃" />
- Forces Internet Explorer 8 to submit UTF8 content correctly.
- <p class="submit"> <input type="submit" accesskey="s" value="%%form-submit-button-text%%"
- Populates content from Step 3 of the Form wizard Look and Feel, Submit Button text.
- %%form-submit-disabled%%/> </p>
- Prevents form submission from preview screens.
- %%form-after-form-content%%
- Populates content from Step 3 of the Form wizard Look and Feel, Below Form tab.
- %%form-end-if-display-form%%
- Marks the end of the form content section.
End
- %%form-javascript-link-target-top%%
- Forces links in your form or thank you content to open in entire window instead of opening in the iframe.
- </form>
- Marks the end of the form element.
Did this article solve your issue?
Let us know so we can improve!

