r/gravityforms • u/GravityOps_Gil • 24d ago
Six Gravity Forms shortcode mistakes we keep fixing on client sites
Disclosure: I work at BrightLeaf Digital, which makes GravityOps, including Global Variables, which comes up twice below. This list came out of building a shortcode reference, linked at the end.
- Nesting gvlogic inside gvlogic. WordPress closes the outer block early. Use gvlogic2 and gvlogic3 (there is no gvlogic4), or put the inner block in a Global Variables variable, which resolves before the outer block and has no depth limit.
- Nesting the Gravity Forms conditional shortcode. Gravity Forms doesn't support it. Use gvlogic, which also works in confirmations and notifications, or put the inner condition in a Global Variables variable. On the Premium and Agency plans the variable can also go straight into Gravity Forms conditional logic.
- Putting GravityView's pagination shortcodes on a normal page. They need a rendered multiple-entries View to describe.
- Treating an unlisted page as private. If a shortcode prints entry data, anyone who loads the page sees it. Gate the page, or use the plugin's own protection, like GravityKit's secret attribute.
- Curly quotes. Paste from Google Docs or Word and the straight quotes turn curly, and the shortcode silently drops its attributes. A gravops_search display attribute has a second trap: nested shortcodes go in double curly braces, and inside a double-quoted display string everything has to use single quotes.
- Expecting relative dates in gvlogic. They work in GravityView field conditional logic, not in the shortcode.
The full reference covers 60+ shortcodes across Gravity Forms, GravityKit, Gravity Flow, Gravity PDF, Gravity Perks and GravityOps, with their attributes: https://brightleafdigital.io/blog/gravity-forms-shortcodes/?utm_source=reddit-gravityforms&utm_medium=community&utm_campaign=gf-shortcodes-guide
Which one has bitten you?
1
Upvotes