Using Fancybox to open a Contact Form 7 form
-
Hi. I’ve been using Easy Fancy box on several sites and it really is a useful plug in.
To date most sites using it have only one form that pops up, some have two. Whilst trying to add a third I have come up against a problem. Despite creating a new separate form/id no, when the link is clicked, all that appears is a small white square with the active Close cross icon on the top right of that square.I did not produce the code originally and there are missing notes on this but could anyone say why you would not get the content of the form appearing?
A working form link is coded thus:
<p class="Enquiry"><a class="fancybox-inline" href="#contact_form_pop">CONTACT</a></p> <div class="fancybox-hidden" style="display: none;"> <div id="contact_form_pop"><!--?php echo do_shortcode('[contact-form-7 id="124" title="Contact Form"]'); ?--></div> </div>
Class=”enquiry” is just label fonts etc.
The non working version is more or less identical:
<p class="Enquiry"><a class="fancybox-inline" href="#second_enquiry_popup">Make an enquiry</a></p> <div class="fancybox-hidden" style="display: none;"> <div id="second_enquiry_popup"><!--?php echo do_shortcode('[contact-form-7 id="560" title="Test form"]'); ?--></div> </div>
As I am working blind (no original dev to ask) Some of the code can be resolved. The parts I am not sure of relate to the href item configuration. Should the #second_enquiry_popup be defined somewhere, or is it purely arbitrary?
First point of investigation is to look for that href value for the working popup form, but it’s not in the child theme CSS I’ve also searched phpmyadmin and nothing is returned.
Can anyone suggest a path to look down?
Thanks.
- The topic ‘Using Fancybox to open a Contact Form 7 form’ is closed to new replies.