bookmark_borderMerge Tags

Gravity Forms uses merge tags to allow you to dynamically populate submitted field values and other dynamic information in notification emails, post content templates and more!

All Fields

  • {all_fields}

    Displays a preformatted HTML table containing all of the submitted values. You may append any of the following additional options. The options are stackable and do not need to be entered in any specific order. Examples: {all_fields:admin,value}, {all_fields:value,empty}

    • :admin

      Uses the fields’ Admin Labels (if specified) rather than the default field labels. Example: {all_fields:admin}

    • :value

      Displays the actual value rather than the corresponding value label. This typically applies to fields with multiple inputs such as checkboxes, radio buttons and drop downs. Example: {all_fields:value}

    • :empty

      Specify whether to show fields for which no value was submitted. Example: {all_fields:empty}

    • :noadmin

      Hides field output of fields set to a Visibility of Admin Only. Example: {all_fields:noadmin}

    • :nohidden

      Hides field output of fields using the Hidden field type. Example: {all_fields:nohidden}

User Meta

  • {user:[meta_key]}

    Displays the value of whatever user meta key is provided for the currently logged in user. Any user meta (including custom user meta) can be displayed with this merge tag. Below are a few examples of how this merge tag can be used. Please note: The user must be logged in when the entry is submitted.

    • :first_name

      Displays the first name of the currently logged in user. {user:first_name}

    • :last_name

      Displays the last name of the currently logged in user. {user:last_name}

    • :display_name

      Displays the Display Name of the currently logged in user. {user:display_name}

    • :user_email

      Displays the email of the currently logged in user. {user:user_email}

    • :user_login

      Displays the user login of the currently logged in user. {user:user_login}

    • :ID

      Displays the ID of the currently logged in user. {user:ID}

Post Fields

  • {[Post Image Field Name]:[field_id]:[size]}

    Displays the uploaded post image for the specified size. This merge tag is only available for the Post Title and Post Body field Create Content Template. A special drop down will appear when a Post Image field is selected form the content template merge tag drop down. This special drop down will provide a variety of pre-built merge tags for displaying the post image at all size and alignment combinations. *{My Post Image:5:thumbnail:left}*

    • :[size]

      Accepts all standard WordPress sizes: “thumbnail”, “medium”, “large” and “full”. Additionally, any registered custom size is supported as well. For more information on adding custom image sizes, read more. {Post Image:5:medium}

    • :[alignment]

      Specify how the post image should be aligned with its adjacent content. Support values are “left”, “right” and “centered”. {Post Image:5:medium:left}

    • :url

      Display the URL to the specified size of the post image. This option nullifies the [alignment] option. {Post Image:5:url}

    • :title

      Display the title of the image from image metadata. {Post Image:5:title}

    • :description

      Display the description of the image from image metadata. {Post Image:5:description}

    • :caption

      Display the caption of the image from image metadata. {Post Image:5:caption}

Embed Post

  • {embed_post:[property]}

    Displays the specified property of the singular post or page from which the entry was submitted. Note: Not designed for use with forms embedded on blog or archive type pages.

    Below are a few examples of how you can use this merge tag:

    • :ID

      Displays the ID of the post/page. Example: {embed_post:ID}

    • :post_title

      Displays the title of the post/page. Example: {embed_post:post_title}

    • :post_author

      Displays the author ID of the post/page. Example: {embed_post:post_author}

Custom Fields

  • {custom_field:[name]}

    Display a custom field value from the post/page the form was submitted from. {custom_field:author_address} {custom_field:zipcode}

Entry Data

  • {entry:[key]}

    The following merge tags can be used in areas such as notifications and confirmations to access entry properties and entry meta values after the entry has been saved, as such they can’t be used as a field’s default value.

    • {entry:id}
      The entry ID of the submission.

    • {entry:created_by}
      The ID of the WordPress user who submitted the form.

    • {entry:date_created}
      The UTC date and time the entry was created in the yyyy-mm-dd hh::mm::ss format.

    • {entry:currency}
      The currency code used for this submission.

    • {entry:payment_status}
      The current payment status of the entry (ie “Processing”, “Pending”, “Active”, “Expired”, “Failed”, “Cancelled”, “Approved”, “Reversed”, “Refunded”, “Voided”).

    • {entry:payment_date}
      The UTC date and time, in the yyyy-mm-dd hh::mm::ss format, when the payment add-on processed the entry.

    • {entry:payment_amount}
      The payment amount without currency formatting.

    • {entry:transaction_id}
      The ID of the transaction returned by the payment gateway.

Entry Meta

The following merge tags can be used in areas such as notifications and confirmations after the entry has been saved, as such they can’t be used as a field’s default value.

  • {entry_id}

    Displays the entry ID of the submission.

  • {entry_url}

    Displays the edit URL for the submitted entry.

  • {post_id}

    Displays the ID of the post which was created during submission. Only relevant when the form uses fields from Post Fields panel.

  • {post_edit_url}

    Displays the edit URL for the post which was created during submission. Only relevant when the form uses fields from Post Fields panel.

Form Properties

The following merge tags can be used in areas such as notifications and confirmations to access form properties. They don’t currently work when used as field default values.

  • {form_id}

    Displays the ID of the submitted form.

  • {form_title}

    Displays the title of the submitted form.

Other

  • {date_mdy}

    Displays the current date in the MM/DD/YYYY format.

  • {date_dmy}

    Displays the current date in the DD/MM/YYYY format.

  • {embed_url}

    Displays the URL from which the form was submitted form.

  • {ip}

    Displays the submitter’s IP address.

  • {user_agent}

    Displays the browser and platform information of the machine from which the entry was submitted.

  • {referer}

    Displays the address of the page which referred the user agent to the current page.

  • {admin_email}

    Displays email address configured on the WordPress > Settings > General page.

Field Merge Tag Modifiers

  • {[Field Name]:[field_id]}

    Displays the value submitted for the specified field ID. If no value was submitted, the merge tag will not display anything. The [Field Name] part is not actually required for the merge tag to work so {:[field_id]} will also work.

    • :label
      Displays the field label.

    • :url (Applies only to List fields)

      Displays the list field content in a format that is URL friendly: (i.e. col1_row1|col2_row1,col1_row2|col2_row2). {List:5:url}

    • :value (Applies only to drop down, checkboxes and radio button fields)

      Displays the selected item’s value. Applicable if the field was configured with ‘enable values’. {Field:5:value}

    • :id (Applies only to the category field)

      Displays the selected category’s id rather than label. {Category:5:id}

    • :price (Applies only to drop down and radio button pricing fields and the total field)

      Displays the selected product’s price in numeric format (i.e. 500). {Product:5:price}

    • :currency (Applies only to drop down and radio button pricing fields and the total field)

      Displays the selected product’s price in currency format (i.e. $500.00). {Product:5:currency}

    • :qty (Applies only to drop down and radio button pricing fields)

      Displays the selected product’s quantity.’

    • :numeric

      Converts the number string or currency value as a decimal-formatted number. Example: {Field:5:numeric}

Add-On Field Merge Tags

See the following pages for details about merge tags for fields added by add-ons:

Field-Specific Merge Tags and Modifiers

Merge tags and modifiers that are specific to a particular field type can be accessed from within that field’s documentation. For a listing of all of the available field documentation, visit the following:

Gravity Forms Field Types