Conditions - Syntax Error in Source Code

  • hoknik
    Asked on February 8, 2016 at 7:10 PM

    I need to use the full source code of my form (GarageShots Car Sale) in order to edit the Countries field, but when using this method, the conditions do not work. Dreamweaver says there is a syntax error at the beginning of the conditions script - specifically the line starting: JotForm.setConditions([{"action":[{

    You can see the form (without my edits - so this is the 100% supplied-by-Jotform source code) here:

    http://www.garageshotsmagazine.com/form-test

    Conditional fields should appear when selecting 1 ad or 2 ads - but only the headings for each section appear, not the fields underneath. The original form is here: https://www.jotform.com//?formID=60206243143947

    I absolutely need it as full source code and have tried your fix of posting the form on a stand-alone page (which is actually the first link I pasted) and then using an iframe to display it on the page I want to ensure no javascript conflicts but the conditions still don't work - I am assuming because it is not due to a conflict but because of the syntax error.  I am not super familiar with javascript so not too sure what the syntax error is, as the form works perfectly when embedded normally or via iframe. 

  • Chriistian Jotform Support
    Replied on February 9, 2016 at 3:09 AM

    There seems to be conflitct between JotForm script and other scripts from your website. Perhaps you can use iFrame to embed your form with the custom code in your webpage. 

    Once you have applied your changes in the form's source code, you can follow these steps to embed your form in your website:

    1. Upload the folders "css" and "js" and the html file of your form to your web server.

    2. Copy the url of your "Seller Information" in your website.

    3. Use the following iFrame code to embed the form in your webpage:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="________" frameborder="0" style="width:100%; height:100%; border:none;" scrolling="no"></iframe> 

    4. Now get your form URL which you have copied in the step number 2 and paste it in the highlighted code of the above iFrame code. (src="________")

    Do let us know if you need further assistance.