Simple as this:
<?php echo do_shortcode( '[contact-form-7 id="'.get_field('form').'"]' ); ?>
You have to notice, you should use get_field()
to return the value. the_field()
will echo it.
Simple as this:
<?php echo do_shortcode( '[contact-form-7 id="'.get_field('form').'"]' ); ?>
You have to notice, you should use get_field()
to return the value. the_field()
will echo it.