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.


  • Profile Image

    Two embed option on one page - Javascript embed and Feedback button embed

    Asked by oxinst on April 30, 2014 at 03:31 AM

    Hi, Is it possible to have two different embed option on the one page using Javascript.  I wish to have one form on the page using hte embed on page javascript option, and then another option on the same page to use the Feedback javascript embed option.

    If I add both the javascript codes to the page, it does not work.

    Do I have to just leave out 'src="http://max.jotfor.ms/static/feedback2.js?3.2.1639"' on the Feedback code?

    So the the code would look like this:

    -------------------------

    <script type="text/javascript" src="http://form.jotformeu.com/jsform/XXXXXXXXXXXXX"></script>

     

    <script type="text/javascript">
      new JotformFeedback({
         formId  : "XXXXXXXXXXXXXXX",
         buttonText : "Title Goes Here",
         base  : "http://jotformeu.com/",
         background : "#F59202",
         fontColor : "#FFFFFF",
         buttonSide : "bottom",
         buttonAlign : "right",
         type  : false,
         width  : 700,
         height  : 500
      });
    </script>

    -------------------------

    Thanks

  • Profile Image
    JotForm Support

    Answered by jonathan on April 30, 2014 at 05:42 AM

    Hi,

    This is possible.

    You just have to add the forms embed code within a separate div container on the page at least.

    You did not include the URL of your website where you wanted to apply this. I did a back check using your account, and I think this is your website http://www.oxford-instruments.com/investors

    I see the Feedback button on the righ side, but I am not able to find the other embedded form if there is.

    To be sure, I made a test page of my own and embed the 2 forms using script embed code and Feedback button embed.

    You can check the web page here working 

    https://shots.jotform.com/jonathan/webtest/Test-Feedback-Button-And-Script-Embed-2-Forms-In-Same-Page.html

    You can view the source code of my test page, and you will see how I embeded the forms.

    http://pastie.org/9126695

    Hope this help. Inform us if you need more assistance.

    Thanks!

  • Profile Image

    Answered by oxinst on April 30, 2014 at 06:12 AM

    @jonathan

    Thanks for the quick reply.  I have tried this, but the lightbox that opens from the feedback button is blank when it opens and does not load the form.  I am using Google tag manager to insert the first set of code.

    ---------------------

    <script src="//max.jotfor.ms/static/feedback2.js?3.2.1639" type="text/javascript"> new JotformFeedback({ formId : "30992160585358", buttonText : "Investor Email Alerts", base : "http://jotformeu.com/", background : "#F79548", fontColor : "#FFFFFF", buttonSide : "right", buttonAlign : "center", type : 1, width : 298, height : 500 }); </script>

    ---------------------

    And then using a DIV to insert the next code on the page

     

    --------------------

    <div><script type="text/javascript" src="http://form.jotformeu.com/jsform/30992160585358"></script> </div>

    ---------------------

    If I remove the form embeded in the page, the feedback button works ok.  Any ideas?

     

    You can see the page here

    http://www.oxford-instruments.com/investors

  • Profile Image
    JotForm Support

    Answered by ashwin_d on April 30, 2014 at 09:01 AM

    Hello oxinst,

    Please use the following feedback code and that should solve your problem:

    <script type="text/javascript" id="" src="//max.jotfor.ms/static/feedback.js?3.2.1639">new JotformFeedback({formId:"30992160585358",buttonText:"Investor Email Alerts",base:"http://jotformeu.com/",background:"#F79548",fontColor:"#FFFFFF",buttonSide:"right",buttonAlign:"center",type:1,width:298,height:500});</script>

    I have just changed the bolded text above from feedback2.js?3.2.1639. I just tested your page here locally and it seems to work fine. Please check the screenshot below:

    Do test the above code and get back to us if the issue persists.

    Thank you!

  • Profile Image

    Answered by oxinst on April 30, 2014 at 10:19 AM

    @ashwin_d

    That is now working just fine.  Thank you for your help

  • Profile Image
    JotForm Support

    Answered by ashwin_d on April 30, 2014 at 10:20 AM

    Hello oxinst,

    You are welcome.

    Do get back to us if you have any questions.

    Thank you!