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

    Mandatory Fields are not working

    Asked by cheiler on September 11, 2013 at 12:47 PM

    Hi, this is a serious issue for us:


    We would like to set our form live, but after we use the Javascript integration, we don't see mandatory fields working.




    I have tried the iFrame integration, however, using the iFrame method, I am not able to pre-populate certain fields (see example link)


    Page URL:

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 11, 2013 at 01:40 PM

    Hello cheiler,

    The required fields of your form is not working becuse of the script conflict between jotform and other script of your webpage.

    Only way to resolve this issue is to embed your form using iFrame script. The url parameter will still work with iFrame. 

    Here is a sample iframe code with url parameter:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" 

    src="//form.jotform.co/form/32524096571859?email3=ash@gmail.com&name=Ashwin" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no"></iframe>

    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split

    (":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) 

    {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] 

    + "px";break;}};if (window.addEventListener) {window.addEventListener("message", 

    handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", 


    Hope this helps.

    Thank you!

  • Profile Image

    Answered by cheiler on September 12, 2013 at 03:07 AM

    Hi Ashwin,


    I am sorry, your answer is not helpful and wrong.


    first, I copied the javascript on a blank HTML page - there is no other content and no other javascript - so there can't be any other script influencing it.

    Second, you suggst that I add coding on my end to parse the URL and then use the parsed parameters for the iFrame URL - this would require coding on our end.

    The reason why I chose Jotform is that we did not want additional coding work in this instance.

    Please review your javascript and fix the bugs in it that prevent us from using it as it should work


  • Profile Image

    Answered by pinoytech on September 12, 2013 at 04:25 AM

    Hi Christian,

    If you are using iframe embed code, you can append the URL parameters on the JotForm URL. Example:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//www.jotformeu.com/form/31782124433348?fullName14[first]=John&fullName14[last]=Doe&email=cheiler@expedia.com&cid=12345&apiKey=abcdef" frameborder="0" style="width:100%; height:7962px; border:none;" scrolling="no"></iframe>

    For more information, please take a look at this article: http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    If you need further assistance, please let us know.

    Thank you!

  • Profile Image

    Answered by cheiler on September 12, 2013 at 04:45 AM

    Hi Pino, thank you, but this does not solve the problem.


    1. The javascript code does not work - I have used an empty HTML page, there is nothing else on it!

    2. To embed in an iframe, I need to parse the URL that I send in an email to the customer and then use the parameters in the iFrame call.

    I really would appreciate if we could solve the problem at hand.

  • Profile Image

    Answered by cheiler on September 12, 2013 at 04:58 AM


    I played a bit with the form and created a simpler version - the JS works if there is no pagination and pagination RULES set up, e.g. if I specify:

    if dropdown A is selected, jump to page 4, the validation is not executed.

    This causes the mandatory validation to fail.

    Please adjust your script so it first validates mandatory fields, then uses pagination.