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

    required fields not validating on submit

    Asked by sdionne on June 18, 2012 at 09:57 PM


    I received a form submission (from a Google Ad click) today that was missing data in all of the fields. I was wondering how the submission could have gotten around the "required field" validation, but then when I tested it myself, I realized the problem. It does give me a "this field is required" or "enter a valid e-mail address" error message, but when I click submit, it still processes the submission. (Tested this in both Chrome and Firefox with similar results.) Any suggestions?

    Page URL:

  • Profile Image

    Answered by jeanettebmz on June 18, 2012 at 10:59 PM

    Since the form has been embedded using its full source code, I think this workaround might help :

    Insert this javascript code within your head tag:

     function validateForm()


    var x=document.forms["form_21584975914163"]["q1_name"].value;

    if (x==null || x=="")


      alert("Name must be filled out");

      return false;






    //The function above could be called when the form is submitted, just place it withing your form tag

    <form class="jotform-form" action="http://submit.jotform.us/submit/21584975914163/" method="post" name="form_21584975914163" id="21584975914163" accept-charset="utf-8" onsubmit="return validateForm()" >



    Another workaround would be to insert a dynamic javascript function


    Best regards


  • Profile Image

    Answered by jeanettebmz on June 18, 2012 at 11:02 PM

    Of course, that function is just an example, in your case you would need to add an Else, to validate email, phone, company and Title

    Please check this link