Gravity Forms Snippets

WordPress is a huge part of my job, and that means spending a lot of time with Gravity Forms. I will occasionally put together a snippet related to Gravity Forms that I think is worth sharing. I usually throw those up to Github Gist. I’ll collect them here as well.


Gravity Forms doesn’t have field groups built-in (at least not yet). That limits what you can do with form styling. This snippet creates “Open Group” and “Close Group” fields that you can use to organize and style your fields.


Gravity Forms also doesn’t let you customize the CSS classes on the form’s submit button. This snippet lets you add a class to this button so you don’t have to repeat your Bootstrap or custom button styles.


This snippet is only useful in particular situations. At the NRCC, we use WP Engine for our hosting. It seems that their caching (which is fantastic) prevents the “Embed URL” merge tag – which we use on a hidden field – from including URL query parameters in the stored entry. This snippet just replaces the shortened URL with the full URL.