Contact form 7 in a widget
-
Hi,
First of all, thanks for the great plugin. It really helps a lot! I have a problem with the Contact form 7. In general its a standard situation: I need a popup with a contact form, which appears when users clicks a button.
But I’m trying to implement it in a widget, not a post or page. So in the widget I have some text and button (I can totally modify the code of the widget). So this is the button:
<a class="fancybox-inline call-to-action-button" href="#contact_form_pop">Contact Us</a>
After the button, I paste the div code, directly to the php file of the widget. It looks something like this:
<div style="display:none" class="fancybox-hidden"> <div id="contact_form_pop" class="hentry" style="width:460px;height:380px;"> [contact-form-7 id="714" title="Contact form 1"] </div> </div>
It actually works, but it does not show the contact form. It shows the shortcode I entered for the CF7. I know that its not correct to put the shortcode directly in the php file, but what are other possible solutions?
Thanks for any help.
- The topic ‘Contact form 7 in a widget’ is closed to new replies.