Skip to content

Instantly share code, notes, and snippets.

@mandiwise
Last active March 8, 2016 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mandiwise/c45939e0d8ecd901c4c2 to your computer and use it in GitHub Desktop.
Save mandiwise/c45939e0d8ecd901c4c2 to your computer and use it in GitHub Desktop.
Using Gravity Forms with a modal and ajax
<div id="voting-form" style="display:none">
<?php echo do_shortcode( '[gravityform id="6" title="false" description="false" ajax="true"]' ) ?>
</div>
<a href="#voting-form" class="fancybox button">Vote Now</a>
@tiaNaturally
Copy link

Hey, just tried out this code directly on my page on my wordpress page but I am getting a PHP error. How did you include it?

@lourdrivera123
Copy link

@tiaNaturally,

Have you tried this:

<?php gravity_form(2, false, false, false, '', true, 12); ?>

https://www.gravityhelp.com/documentation/article/embedding-a-form/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment