Question: Hello I have prepare jQuery validation for my Gravity Forms registration form to prevent submit but if my condition is match I want to submit my form but Javascript is not work as expected code is 

```
jQuery("#gform_1").submit(function(e){
    if(jQuery("#input_1_1_3").val()=='' || jQuery("#input_1_1_6").val()=='' || jQuery("#input_1_2").val()=='' || jQuery("#input_1_4").val()=='' || jQuery("#input_1_5").val()=='' || jQuery("#input_1_3").val()=='' || jQuery("#input_1_3_2").val()==''){
      alert("All fields with * is mandatory");
        return false;
    }else{

      jQuery("#gform_1").submit();
      return true;
    }
});

```

The Only problem is with the submit function I don't know why it's not working, You can check form on my [website](http://tajmotel.com/sign-up/)

Answer: 
On your form submit button , you have this code on click

```
   onclick='if(window["gf_submitting_1"]){return false;}  window["gf_submitting_1"]=true;  '

```

This codes makes your submit button works only once . Try removing it and it should work
Gravity forms has an inherent validation options. for each field, on the form builder page, you can choose to mark it as required and create a custom error for the field.

when embedding the form on the WordPress page you can choose that the submission will be done with Ajax so the page will not be reloaded on submitting. 

if you want to create a custom validation, I'd suggest using the ["gform\_validation" hook](https://docs.gravityforms.com/gform_validation/).