Using do_shortcode() with contact form 7 and tag is missing
-
Hi, I’m trying to use contact form in my template using do_shortcode and popup (Request availability button on a page). But I’ve noticed that form generated only inputs without <form> tag as usual so it failed to submit.
That’s how I’m implementing it in functions.php
function wc_shop_popup() { $reqform = '[contact-form-7 id="987" title="Request availability"]'; echo '<a class="button button_full_width button_left req_button popup-link" href="#popup-availability" rel="lightbox" data-type="inline"><span class="button_icon"><i class="icon-layout"></i></span><span class="button_label">Request Availability</span></a> <div id="popup-availability" class="popup-content mfp-hide"><div class="popup-inner" style="padding:20px;">'.do_shortcode($reqform).'</div></div>'; } add_action( 'woocommerce_after_add_to_cart_button', 'wc_shop_popup' );
Any suggestions?
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using do_shortcode() with contact form 7 and tag is missing’ is closed to new replies.