-
shrmindiaAsked on June 7, 2016 at 11:49 AM
Hi seems I'm having a conflict with JS as my Feedback & LightBox doesn't seems working on my website.
Can you help me guys?
Here's the code and I'm trying on Localhost:
<script src="https://form.jotform.me/static/feedback2.js?3.3.REV" type="text/javascript">
new JotformFeedback({
formId: "61584969666477",
buttonText: "#SHRMI16 - Updates",
base: "https://form.jotform.me/",
background: "#F59202",
fontColor: "#FFFFFF",
buttonSide: "bottom",
buttonAlign: "center",
type: false,
width: 700,
height: 500
});
</script>
-
CharlieReplied on June 7, 2016 at 1:19 PM
Could you please provide us the website where the conflict is happening?
I tried your embed code and pasted it on a sample HTML page I created, here it is: https://shots.jotform.com/charlie/sample-lightbox.html. It is working as expected. If your website is loading a lot of different JS libraries like jQuery, then there is a high change that you'll have a lot of script conflict. Unfortunately, we cannot do anything about it, you could you the $.noConflict of jQUery, here's the documentation page about it: https://shots.jotform.com/charlie/sample-lightbox.html
Now if you still want to have a lightbox or modal like display on your forms, then I believe you need to setup your own modal or lightbox on your website. Then embed the form using the iFrame code.
In my case, here's how I'll do it:
1. If my website is loading jQuery, then I'll use jQuery's Dialog element to wrap the iFrame embed code on it. Here's the specific documentation page for it: https://jqueryui.com/dialog/
2. Now I'll embed my JotForm form's iFrame code on that element.
I hope that helps.