Gravity Forms: Add class to body after submission

With this small code snippet, a class is added to the <body> tag of your page once a Gravity Form has been submitted. I used this code so I could hide some other elements on a contact page after form submission via CSS.

This does not work with ajax forms, sorry.

About the Author
Derek Ashauer is the sole developer at WP Sunshine. He also does client work through his agency AshWebStudio where he has been working with WordPress since 2005.