Hello friends, welcome to my another blog post how to open contact form 7 in popup. Recently I was working on a project for my client and he need a inquiry button. When ever user click on this button a form will popup. I know it can be done with contact form 7 and any jQuery plugin like fancybox, lightbox etc. So I was searching for WordPress plugins for this and I got one plugin “Form Lightbox” and my issue was solve. So today I will tech you step by step process to open contact form 7 in popup.

Step 1: Create your Form and copy the shortcode

Install contact form 7 plugin and create your form first. After creating your form contact form 7 gives you a short code like this [contact-form-7 id=”113″ title=”Contact form 1″]. Here id will be your contact form 7 form id



Step 2: Install Lightbox plugin

After setup your contact form 7 now you need to install Form Lightbox plugin from WordPress and active it. You will see below image like page in WordPress Form Lightbox Plugin page.

formlightbox

This plugin has a shortcode like this:
[formlightbox_call title=”{title of the lightbox}” class=”{unique_id}”]Click here[/formlightbox_call] and object shortcode [formlightbox_obj id=”{unique_id}” style=”” onload=”false”][form shortcode here][/formlightbox_obj]

Step 3: Use of contact form 7 and form lightbox plugin together

If you want to use contact form 7 popup in your php file (page template, header, footer etc) copy the below code and paste it to your file:

If you want to use contact form 7 in your page or post or widget copy the below code and paste it into your page or post:

[formlightbox_call title=”lightbox form” class=”1374826386773″]Request for a Callback[/formlightbox_call][formlightbox_obj id=”1374826386773″ style=”” onload=”false”][contact-form-7 id=”113″ title=”Contact form 1″][/formlightbox_obj]

When ever you click on the button it will show your form in popup. Now you know how to open contact form 7 in popup. If you face any issue please comment below.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
How to open contact form 7 in popup
Tagged on: