This post is about Gravity Forms, a WordPress contact form plugin.
I know about Gravity Forms…but what are shortcodes?
Think of shortcodes as a placeholder for where other content will be displayed: instead of “Insert a Gravity Forms form here,” we use the `gravityform` shortcode. Learn more about shortcodes on WordPress.org.
The Gravity Forms `shortcode` has five pieces:
` Oops! We could not locate your form.
- `id` (required) – The ID of the form, as displayed on the Gravity Forms Edit Forms page in the Id column
- `name` (required) – The name of the form.
- `title` – Show the title to users? Default is true; set to “false” to disable
- `description` – Show the form’s description to users? Default is true; set to “false” to disable.
- `ajax` – Submit the form without refreshing? Default is false; set to “true” to enable.
Gravity Forms Shortcode Examples:
``
Will result in Form #1 being displayed without a title or description, with no-refresh entry submission.
The shortcode above could be read as: “Insert Gravity Forms Form #1 here. Do not show the title or description. The form should use Ajax to submit entries.”
``
Will result in Form #2 being displayed. The title and description will be displayed (they are true by default), and entries will require a page-load (ajax is off by default).
``
Will result in Form #3 being displayed. The title will be displayed, but the description will not. Entries will not require a page-load (ajax is turned on).
Any questions?
This post has been created to make explicitly clear how the Gravity Forms shortcode works. If you have any unanswered questions, please leave them in the comments below and they will be answered.
An (advanced) note about custom Gravity Forms shortcode attributes:
In Version 1.6.5 of Gravity Forms, a feature was added to allow for custom shortcode attributes to be added by other Gravity Forms add-on plugins. This means that there may be more pieces to the shortcode in the future!
13 replies on “{Gravity Forms Shortcode Explained|Gravity Forms Shortcode – A Detailed Explanation}”
thanks!!! i was looking for this
…..
Thanks.
I didn’t succeded in finding the same informations on gravity web site
Hey there! I have had to uninstall plugins from my WordPress blog because the CKEditor turned the shortcodes into literal text. I tried temporarily deactivating CK Editor (which kinda hurt, because it took an Ice Age to get it working correctly with CKFinder!) and activated the plugins I wanted on the site (A Business Directory and Contact Form) but then had problems with fonts and display.
Is there a way ’round this?
Cheers!
When I use the [directory] short code, I can’t specify which form I want the entries to come from. It defaults to the first one. How do I specify which form I want? Also, when I click on the “add a gravity forms directory” icon in the WYSIWYG editor, it does nothing.
Use [directory form=”#”] where # is the form id.
What browser are you using? Does e Insert Directory error occur when you disable all other plugins except Gravity Forms and this one?
Brilliant article bro. This unique is just a totally nicely structured posting, just the important information I was hunting regarding. Cheers
Thanks I needed these urgently.
thanks, this info was really very helpful.
Don’t forget about the field_values attribute. If you have fields set to dynamically populate, you can use it in the style of [gravityform id=#..... field_values="id=xx&day=xx"], etc.
thanks
I was looking for shordcodes which show the entry lists in the front Page/ or home
please reply me
There’s no shortcode for that unless you use Gravity Forms Directory.
Hi,
Is it possible to display entries in the front end (using any shortcodes by using form id)??