1. Home
  2. Knowledge Base
  3. Form Shortcodes

Form Shortcodes

Form shortcodes can be used on any post or page on your WordPress site.


[gravityform id="1" title="false" description="false" ajax="true" tabindex="49"]

id (required): The ID of the form to be embedded
title: Whether or not to display the form title (default: “true”)
description: Whether or not to display the form description (default: “true”)
ajax: Whether or not to use AJAX to submit the form
tabindex: The starting tab index for the fields of this form

Conditional Shortcodes

Use conditional shortcodes [gravityforms][/gravityforms] to add conditions in the message of your Admin and User Notification emails as well as the Confirmation Message that is displayed when a form is submitted.

Example 1:

[gravityforms action="conditional" merge_tag="{Number:1}" condition="greater_than" value="3"]
Content you would like to conditionally display.

action (required): Must be set to “conditional” as in the example above.
merge_tag (required): The form merge tag whose value you are executing the conditional logic for. You can get the correct merge tag for the form data you would like to use using the insert merge tag drop down.
condition (required): The type of condition used to determine success. Available conditions are: is, isnot, greater_than, less_than, contains, starts_with, ends_with.
value (required): The value that the condition must equal in order for the condition to be met and the content displayed.

Example 2:

[gravityforms action="conditional" merge_tag="{Number:1}" condition="greater_than" value="10"]
This content would be displayed if the value of field id 1 is greater than 10.

Example 3:

[gravityforms action="conditional" merge_tag="{Country:5}" condition="is" value="United States"]
This content would be displayed if the value of field id 5 is United States.

Example 4:

[gravityforms action="conditional" merge_tag="{Country:5}" condition="isnot" value=""]
This content would be displayed if no value exists for field id 5.
0 replies


Please note that this is not a support forum. If you are experiencing issues on your site, please open a support ticket instead. Site-specific support questions submitted as comments will be unanswered.

Leave a Reply

Your email address will not be published. Required fields are marked *