Support » Plugin: Conditional Fields for Contact Form 7 » Conditional fields not working with echo shortcode

  • Resolved mijnmarketing

    (@mijnmarketing)


    Hi There,

    We need some help with an issue.

    The conditional fields are not working if we embed the form into a .php template.
    We use the echo do_shortcode function in the template.

    Form is working correctly in a wp page, but not in a .php template.

    please help.

Viewing 1 replies (of 1 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    It’s working fine over here: https://conditional-fields-cf7.bdwm.be/fixed-form-template/

    Can you link me to the page?

    The code I use is:

    		<?php while ( have_posts() ) : the_post(); ?>
    			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    				<div class="post-content">
    					<p>The form below is generated using the code in the page template: <code>echo do_shortcode('[contact-form-7 id="242"]');</code></p>
    					<?php echo do_shortcode('[contact-form-7 id="242"]'); ?>
    				</div>
    			</div>
    		<?php endwhile; ?>
    • This reply was modified 3 months, 3 weeks ago by  Jules Colle.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.