What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Embed code for a lightbox form not working on php page on wordpressAsked by adamBA on July 16, 2014 at 01:50 PM
When I paste the lightbox embed code directly onto a template page in wordpress, the popup does not activate when the link is clicked, yet when I post the same code into a text editor box through the wordpress page editor interface it works.
Am I missing something?
Did you paste the lightbox code while on the Text tab?
Or maybe the form conflicts with the script on your page that's why it does not work on the live page. Can you please provide a test page where we can check the lightbox form here?
Sorry, I think I have misunderstood your question.
Maybe the template strips off the embed codes. Would be great if you can provide a test page where we can inspect the embedded lightbox form here.
No problem. Your second answer made more sense.
Because it's easier to use the existing form where I want the lightbox to appear, I left it on a live page. You'll have to create an account at
use postal code m9r4c8
then click on "your account" in the top right.
You'll then see "feedback" under the subscription headings. That link, as far as I can tell, should cause the lightbox to pop up but does not.
I took a look at your page and it appears that your lightbox is embedded properly and the anchor is setup properly:
It also says to use the text editor box. If you are unable to find a suitable solution other than a lightbox, let us know and we will see what we can do.
Thank you for using Jotform!
You're right about JS and wordpress so I ended up using wp_enqueue_script () twice. Once to enqueue:
windowTitle:'Sorry you\'re leaving',
and once to enque:
The popup now works, but is blank... Any thoughts? Thanks
After the popup it still needs to run the scripts that create the form. I do not believe it is able to do so. So even though the popup comes up, nothing is populated into the frame. I believe you may not be able to embed the form in this manner. We do have a wordpress widget that assists with embedding forms to wordpress:
Though I do not believe this will help you attain what you are looking for.
I am not 100% is what you want is do-able so I escalated your issue to our development team to see if one of them might be able to help. We will update you as soon as we can.
Thank you for using Jotform!
I was able to embed JotForm's lightbox code into a WordPress template, and the light box opens as expected:
I used the default WordPress theme TwentyFourteen, and placed it in single.php.
I registered for your site, and clicked the link. I see a JS error that it's blocking content because it's insecure:
To fix this, use the secure version of the lightbox embed code by clicking the secure checkbox:
Hopefully that will resolve the issue. Please update us on the status. Thanks!
I have moved your new question to a separate thread, it will be addressed here: