---
schema_version: "1"
id: 3113ceed32d742ae588a0db86897d9e0498d969e10fb71f5c8d16a117b57500a
title: Layout Template Form Code
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/pardot_forms_layout_template_form_code.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.pardot_forms_layout_template_form_code.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8a7112f710e251f985f8e3cb993cf0526cb41e6b566ed3435b4f118d391ff146
description: The contents of the form tab is inserted into the %%content%% tag of your layout template.
products:
  - Marketing
  - Marketing Cloud Account Engagement
release: "264"
---
# Layout Template Form Code

The contents of the form tab is inserted into the %%content%% tag of your layout template.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <span>All Account Engagement Editions</span></td></tr></tbody></table>

## 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="&#9731;" />

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.