Overview
Gravity Forms shortcodes allow you to embed forms in WordPress pages and posts. While the block editor can generate shortcodes automatically, understanding the available parameters like theme, AJAX settings, and field defaults gives you more control over form behavior and appearance.
If you’re using the standard WordPress editor, it automatically generates shortcodes for you. This guide explains what those shortcodes do and how to customize them manually if needed.
Refer to the next section below if you just want further information on adding a form to your site.
How Shortcodes Work
WordPress shortcodes are placeholders that trigger specific functions when a page or post loads. The Gravity Forms form shortcode is the primary way to display a form on your site. It can be used anywhere shortcodes are supported, though most commonly you’ll add them to post or page content.
Example Form Shortcode
[gravityform id="1" title="false" description="false" ajax="true" tabindex="49" field_values="check=First Choice,Second Choice" theme="orbital"]
Parameters
The following parameters can be added to a shortcode. All are optional unless marked otherwise.
| Parameter | Description | Example Usage |
|---|---|---|
| id | Required. The numeric ID of the form that is to be embedded. For help finding the form ID, refer to this guide. | id='1' |
| title | Whether or not to display the form title. Defaults to true. | title='false' |
| description | Whether or not to display the form description. Defaults to true. | description='true' |
| ajax | Specify whether or not to use AJAX to submit the form. | ajax='true' |
| tabindex | Specify the starting tab index for the fields of this form. Defaults to 0, which prevents Gravity Forms including the tabindex attributes in the field markup, so the browser will determine the tab order automatically. | tabindex='4' |
| field_values | Specify the default field values. See this article for detailed information on dynamically populating field values. | field_values='check=First Choice,Second Choice' |
| theme | Specify the theme to be applied to the form by providing the theme slug. Possible values are orbital for the Orbital Theme and gravity for the Gravity Forms 2.5 Theme. Orbital-themed forms set this way will be styled using the Orbital default style settings, which can be modified using this filter. | theme='orbital‘ |
| styles | Optional JSON-encoded style settings. | See below. |
styles='{"theme":"","inputSize":"md","inputBorderRadius":"20","inputBorderColor":"#0693e3","inputBackgroundColor":"#fff","inputColor":"#112337","inputPrimaryColor":"#204ce5","labelFontSize":"20","labelColor":"#112337","descriptionColor":"#585e6a","buttonPrimaryBackgroundColor":"#7700e6","buttonPrimaryColor":"#fff"}'
Adding a Shortcode Using the Shortcode Block
If you are using the block editor and want to add a form using the shortcode (instead of theĀ Gravity Forms block), use the Shortcode block, which is found under the Widgets category.
To do this, follow these steps:
- Note the form ID of the form you wish to insert on the page.
- Within the new block-based editor, bring up the (+) or “add new block” dialog where you would like to position it on the page.
- Use the search bar to find the Shortcode block and add it. See screenshot.
- Insert a valid Gravity Forms shortcode inside the shortcode block. Don’t forget to add the specific form ID you noted within the id=X argument. See screenshot.
- Preview your form, and make sure everything checks out

Common Issues
If you reference a form ID that doesn’t exist, you’ll see the message “Oops! We could not locate your form.” Double-check that the form ID in your shortcode matches an actual form in your WordPress admin.
If AJAX submission isn’t working, confirm that JavaScript is enabled in your browser and that no JavaScript errors are blocking the form submission. Check your browser’s developer console for errors.
If field values aren’t pre-filling, verify that your field_values parameter uses the correct field names and syntax. Field names are case-sensitive.
If styling isn’t applying, ensure your JSON in the styles parameter is valid. Invalid JSON will be ignored.
Extending Shortcodes
Other plugins can extend Gravity Forms shortcode functionality. Refer to this article for information on additional shortcode functionality that comes with our official User Registration plugin.