Adding the Gravity Form and Enabling Ajax via ShortCode

Gravity Form is one of the most powerful and robust form there is for any custom wordpress development. There might be the case when you need to add the Gravity Form via Shortcode in your custom wordpress theme, and it can be done easily via adding a shortcode. Snippet to add the Gravity Form <?php […]

Adding the Gravity Form and Enabling Ajax via ShortCode

Table of Content

Gravity Form is one of the most powerful and robust form there is for any custom wordpress development.

There might be the case when you need to add the Gravity Form via Shortcode in your custom wordpress theme, and it can be done easily via adding a shortcode.

Snippet to add the Gravity Form

<?php 
echo do_shortcode( '[gravityform id="1" title="false" description="false" );
?>

Above code hides the title and description of the form.

Adding ajax functionality

It  is easy, just need to add one more field in the shortcode as:

<?php 
echo do_shortcode( '[gravityform id="1" title="false" description="false" ajax="true"]' );
?>

I hope it helps.

About Author

Robin Thebe

Digital Strategist based in Sydney.

I am multi disciplined web developer based in Sydney focusing around WordPress web design, wordpress development, SEO Services, SEM and Email Marketing.