Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yellowberri-snippets/10027066 to your computer and use it in GitHub Desktop.
Save yellowberri-snippets/10027066 to your computer and use it in GitHub Desktop.
PHP: ACF: Gravity Form Field Embed
<?php if (get_field('gravity_form')) : ?>
<div id="contact-form">
<?php
$contactForm = get_field('gravity_form');
gravity_form(
$contactForm->id,
$display_title=true,
$display_description=false,
$display_inactive=false,
$field_values=null,
$ajax=true,
0
);
?>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment