How can I avoid script conflicts?

  • dpdeleon
    Asked on April 1, 2019 at 8:49 AM

    I'd like to include the code for the forms on my website. When comparing the code from lets say form1 to form2 the javascript function names are the same e.g. JotForm.prepareCalculationsOnTheFly but have different parameters passed in to the call.

    Since both forms use the same function but pass different parameters to the call I can't see how this function call would be used unless the function allowed for different parameters when it was called. I know this isn't the case since the function has hard-coded parameter names.

    I don't want to embed the call in my HTML because there's some sort of bug either with the bootstrap3 framework or with jotform whereby the embedded script does not get called. Second, it's of course faster to include the code (I haven't tested this yet).

    Is there a way to include code for multiple forms on the same page?

  • Support_Management Jotform Support
    Replied on April 1, 2019 at 11:17 AM

    The parameters will indeed vary from form to form. If there's a script conflict between your website and ours, the safest route is to use the iframe embed codes.

    Complete guide: Getting-the-Form-iFrame-Code

    If that won't suffice, please give it another try, only this time, exclude the script part and only use the iframe codes alone.

    How can I avoid script conflicts? Image 1 Screenshot 20

  • Denis de Leon
    Replied on April 1, 2019 at 4:23 PM

    Thanks Jim. I have no idea why this would work but it does and I won't argue with success.