The Gravity Forms shortcode is still one of the main ways to embed a form in WordPress. Gravity Forms describes it as the primary way to display a form on your site, and it works anywhere WordPress supports shortcodes. That makes it useful in posts, pages, shortcode blocks, and many shortcode-friendly builders.
For many sites, that is enough. You add the form, hide the title or description if needed, maybe enable AJAX, and publish the page. But many Gravity Forms users eventually move beyond simple embedding. They start needing secure prefilling, connected data, smarter output, or front-end totals. That is where understanding the shortcode becomes more valuable, because it helps you see exactly where the built-in embed options end and where a more advanced workflow begins.
In this guide, you’ll learn what the Gravity Forms shortcode does, how its main parameters work, when shortcode is the best option, when the block or function-call method makes more sense, and how to know when you have outgrown the default embed options.

What the Gravity Forms shortcode actually does
A shortcode is a small piece of text inside square brackets that tells WordPress to output something dynamic. In Gravity Forms, the form shortcode displays a specific form on the front end. The required part is the form ID. The rest of the parameters control how that form is displayed or behaves.
Many users never type the shortcode manually because Gravity Forms can generate it for them. The Embed Form flyout, available in Gravity Forms 2.6 and newer, can create a new page or post, insert the form into existing content with the block editor, or copy the form shortcode for use in shortcode-friendly builders. That is why shortcode knowledge still matters even if you do not hand-write it every time.
The basic Gravity Forms shortcode format
At its simplest, the shortcode looks like this:
[gravityform id="1"]
That tells Gravity Forms to display form ID 1. The id parameter is the only required parameter.
A more complete example looks like this:
[gravityform id="3" title="false" description="false" ajax="true"]
This version still embeds the form, but it also hides the form title, hides the description, and enables AJAX submission. Gravity Forms also supports other useful parameters, including tabindex, field_values, theme, and styles.
Gravity Forms shortcode parameters explained in plain English
Here are the shortcode parameters most users should know.
| Parameter | What It Does | Plain-English Explanation |
|---|---|---|
id | Selects the form to display | This is required. It tells Gravity Forms which form to show. If the wrong ID is used, the wrong form will appear or the shortcode may not work. |
title | Shows or hides the form title | This controls whether the form title appears above the form. By default, Gravity Forms shows it, so title="false" hides it. |
description | Shows or hides the form description | This controls whether the form description is displayed. It also shows by default unless you turn it off. |
ajax | Enables AJAX form submission | This controls whether the form submits without reloading the page. It can make confirmations and multi-page form steps feel smoother. |
tabindex | Sets the starting tab order | This controls keyboard navigation order. A value of 0 lets the browser handle tab order automatically. |
field_values | Passes default values into fields | This is used for dynamic population. It lets you prefill fields with values from the shortcode or other sources. |
theme | Applies a form theme | This lets you choose a theme by slug, such as orbital or gravity. |
styles | Passes custom style settings | This lets you apply JSON-encoded style settings. It is part of the shortcode reference, though many users may never need to write it manually. |
Real Gravity Forms shortcode examples and when to use them
If you just want to embed a form on a page, this is enough:
[gravityform id="5"]
Use this when you simply want the form to appear and do not need to change anything else.
If the page already has its own heading and intro, this cleaner version is often better:
[gravityform id="5" title="false" description="false"]
Use that when showing the built-in form title and description would feel repetitive. Gravity Forms documents both parameters and their defaults.
If you want a smoother front-end experience, especially on longer forms, use AJAX:
[gravityform id="5" ajax="true"]
Gravity Forms supports AJAX in both the shortcode and the block settings.
If you want to prefill a field from the shortcode itself, use field_values:
[gravityform id="5" field_values="event_name=Workshop"]
You can also pass more than one value:
[gravityform id="5" field_values="event_name=Workshop&event_type=Live"]
Gravity Forms supports dynamic population through shortcodes, query strings, and hooks, but you must enable dynamic population on the target field first.
Shortcode vs block vs theme-file method
These methods overlap, but they are not identical.
Use the shortcode when you want portability
The shortcode is best when you want something you can copy and paste into shortcode-friendly areas. That includes classic content, shortcode blocks, and many builders. It is also useful when you want a text-based embed that is easy to reuse.
Use the block when you want the easiest editor-friendly option
The Gravity Forms block is best when you are working in the WordPress block editor and want a more visual setup. Current block settings include the form selector, title, description, theme, preview, AJAX, field values, and tabindex.
One important detail: it is no longer accurate to say the block uses the shortcode behind the scenes. In version 2.7.7, Gravity Forms updated the form block so it no longer uses the shortcode for rendering.
Use the theme-file or hook method when you are working in code
If you are embedding forms in a theme file or third-party hook, Gravity Forms documents the gravity_form() function call for that job. It supports parameters for title, description, field values, AJAX, tabindex, form theme, and style settings.
most useful advanced Shortcode feature: dynamic population
If you only remember one advanced shortcode parameter, make it field_values. Dynamic population lets one form behave differently depending on where you embed it. Gravity Forms lets you pass values through query strings, shortcodes, and hooks, and the block settings also include field values.
This is useful for event registrations, service inquiry pages, campaign landing pages, or any setup where the same form needs slightly different default values depending on where it appears. But there are limits. Gravity Forms specifically notes that dynamic population uses PHP, so it cannot be used in cached pages in the usual way.
That is where GravityWP starts to matter more.
JWT Prefill is the better fit when you need secure prefilling. GravityWP says it creates JSON Web Tokens to populate fields and validate data you do not want tampered with.
API Connector is the better fit when values need to come from an external API or when you need a reusable API connection with authentication and custom headers. GravityWP’s docs say you can add multiple APIs, manage authentication methods, set custom headers, and configure how data is sent and received through feed settings.
Advanced Merge Tags is the better fit when your next challenge is output control rather than prefilling. GravityWP describes it as an add-on that adds extra merge tag modifiers for tasks such as capitalization, trimming, formatting, and retrieving information.
Count is the better fit when the real need is not prefilling at all, but showing counts or totals. GravityWP says Count can count, filter, and display the number of entries or the total of a number field, and its docs include the gravitywp_count shortcode.
That is the key commercial takeaway: the Gravity Forms shortcode is excellent for embedding and basic population, but once your form becomes part of a larger workflow, a dedicated tool is often the cleaner long-term solution.
When the shortcode stops being enough
The default Gravity Forms shortcode is great at one main job: embedding a form with a few display and population options. It starts to fall short when your form needs more than that.
Common signs that you have outgrown the default shortcode are needing secure prefilling, API-driven data, more control over how values are displayed after submission, or front-end counts and totals. Those are exactly the areas where GravityWP’s add-ons are positioned: JWT Prefill for secure prefilling, API Connector for external data workflows, Advanced Merge Tags for output control, and Count for totals and counts.
The practical lesson is simple: do not force one shortcode to solve problems it was never designed to solve. Use the built-in shortcode for embedding. Use the right add-on when the workflow becomes more advanced.
Related shortcode features many users overlook
The main form shortcode is not the only shortcode-related feature worth knowing.
Gravity Forms also supports a conditional shortcode for notification emails and confirmation messages. Its docs say the conditional shortcode lets you perform conditional logic in Admin and User Notification emails and in the Confirmation Message shown after submission.
It also supports chaining forms with shortcodes. Gravity Forms documents this as placing the shortcode for another form inside the confirmation of the first form so the second form displays after the first is submitted. Its docs also note that data from the first form can be carried into the second using parameters.
These are not everyday features for every site, but they are good examples of why shortcode knowledge still matters beyond simple embedding.
Common shortcode mistakes and limitations
The biggest limitation to know is this: Gravity Forms does not support embedding the same form multiple times on one page. That includes repeated use through shortcode, block, widget, function call, modal, accordion, tabbed interface, or slider. Gravity Forms says this can cause issues such as hanging submissions, wrong-form submissions, tabbing problems, CAPTCHA issues, and payment-related problems.
Other common mistakes are simpler. Users paste the wrong form ID. They put the shortcode into an area that does not support shortcodes. Or they assume field_values is enough for secure prefilling and more advanced connected workflows. In practice, those cases usually need something more purpose-built.
Need more than the default Gravity Forms shortcode?
If the standard shortcode is doing the job, keep it simple.
But if your form needs to do more than embed, GravityWP gives you more specialized next-step options:
- JWT Prefill for secure prefilling
- API Connector for external API workflows
- Advanced Merge Tags for smarter output control
- Count for totals and entry-based displays
That way, you are choosing a tool that matches the real bottleneck in the workflow instead of trying to stretch the default shortcode too far

Final thoughts for Gravity forms shortcode
The Gravity Forms shortcode is still worth learning because it gives you a flexible, reliable way to embed forms in WordPress. Once you understand parameters like id, title, description, ajax, tabindex, field_values, theme, and styles, you can handle a lot of real-world form setups without touching custom code.
But the bigger win is knowing where the shortcode stops being the best answer. If all you need is a clean embed with a few display settings, shortcode may be enough. If you need secure prefilling, API-driven values, smarter output, or live totals from entry data, that is where the right GravityWP add-on becomes the practical next step.
Frequently Asked Questions
it’s the shortcode used to display a specific Gravity Form on your WordPress site. Gravity Forms describes it as the primary method used to display a form, and it can be used anywhere shortcodes are supported.
The most basic version is:
[gravityform id="1"]
The required part is the numeric form ID.
Use the shortcode when you want a portable, text-based embed you can paste into shortcode-friendly areas. Use the block when you want the easiest editor-based setup inside WordPress. Gravity Forms documents both methods separately, and the Embed Form flyout can also create block-based embeds or copy the shortcode for you.
It passes values into fields for dynamic population. Gravity Forms documents dynamic population through shortcode, query strings, and hooks, and the block settings also include a Field Values option.
No. Gravity Forms says embedding the same form more than once on a single page is not supported and can cause several front-end problems.
That depends on the limitation. Use JWT Prefill for secure prefilling, API Connector for external API workflows, Advanced Merge Tags for more output control, and Count for counts or totals. Those are the cases GravityWP’s docs directly support.
A good rule is this: if your goal is only to embed a form and pass a few simple defaults, the shortcode is enough. If your form needs to protect prefilled values, work with external systems, control output more precisely, or display live totals, you have likely moved into a use case where a dedicated add-on is a better fit.
Our Premium add-ons for Gravity Forms
List Number Format
With this Gravity Forms Add-on you can change List Field columns into a number field, do calculations within a row or column. Extra merge tags are available with total counts of columns.
Advanced Merge Tags
This Gravity Forms Add-On adds extra Merge Tag modifiers (and a lot of power). From the most common used functions like capitalize and length to changing date formats.
JWT Prefill
Fill forms with data you can trust. Prefill Gravity Forms fields with a secure token instead of links with editable url parameters, so your data is accurate, tamper-proof, and ready to use.
Update Multiple Entries
Trigger the update of multiple entries in a target form by submitting an entry in a trigger form.
Read tutorials about
How to Create a Public Submission Business Directory in WordPress (Gravity Forms + GravityView)
Build a moderated business directory where users submit listings through a form, admins approve entries, and approved businesses appear in a searchable GravityView directory.
How to Create an Event Workshop Registration + Waitlist System in WordPress
This guide shows how to set up a workshop registration + waitlist system in WordPress: register attendees until capacity is reached, waitlist the rest, approve entries, and auto-promote people when a seat opens using Gravity Forms, Gravity Flow, and GravityView.
Gravity Flow Form Submission Step Tutorial
The Gravity Flow Form Submission step pauses a workflow until another form is submitted, then continues once the handoff is complete. This guide shows how to connect two forms, prefill fields with mapping, send the correct secure link, and troubleshoot the most common “workflow didn’t move” issues.
Gravity Flow Delete an Entry Step Tutorial
The Gravity Flow Delete Entry step lets you trash or permanently remove Gravity Forms entries as part of a workflow. This guide covers the key settings, scheduling options (delay or date-based), and safe testing tips so you can follow retention and privacy rules with confidence.