Gravity Forms uses shortcodes to embed forms and display dynamic content on your WordPress site. The most common is the , while others handle login forms, entry counts, and conditional logic. 1. Main Form Embed Shortcode
Beyond embedding forms, Gravity Forms provides shortcodes to display submitted data or provide user-specific information. These are invaluable for creating dashboards, directories, or user profiles.
Using shortcodes allows you to place forms in widgets, footer areas, inside other plugins, or programmatically within your theme templates with granular control over how they function. list of gravity form shortcodes
If you are using the , you can display a list of entries on the front end of your site. This turns your form into a user-generated directory or a members-only list.
When using the Mailchimp Add-On, sometimes you want to separate the form from the checkbox. You can actually output the "Sign up to newsletter" checkbox manually using the feed ID if you are building custom integrations. Gravity Forms uses shortcodes to embed forms and
[gravityforms action="conditional" merge_tag="Field:1" condition="is" value="Yes"] Your content here [/gravityforms] 3. User Registration & Login Shortcodes
[gravityform_directory]
: The logic to apply, such as is , isnot , greater_than , or contains .
id parameter is strictly required, its secondary attributes provide the first layer of customization: id="X" : The unique identifier for your form. title="true/false" : Toggles the visibility of the form's name. description="true/false" : Displays or hides the internal description. ajax="true" : Enables submission without a full page reload, a critical feature for modern UX. field_values="key=value" : Perhaps the most versatile attribute, allowing you to "pre-seed" fields with specific data before the user even arrives. Conditional Logic: The Hidden Architect The true power of Gravity Forms shortcodes lies in their ability to act as logic gates within your site’s content. The Main Form Embed Shortcode Beyond embedding forms, Gravity
Gravity Forms has a suite of official add-ons that come with their own shortcodes. These are often overlooked but are critical for specific workflows.
: Displays a login form. Parameters include logged_in_message , login_redirect , and registration_link_text .