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: 
Custom jQuery not executing with gravity forms? Try putting it inside 

```
jQuery(document).on('gform_post_render', function(){
    // your js here
});

```

Read the documentation here <https://docs.gravityforms.com/gform_post_render/>

From the docs:

> 
> "This jQuery hook is fired every time the form is rendered to allow custom jQuery to be executed. This includes initial form load, going to the next/previous page on multi-page forms, form rendered with validation errors, confirmation message displayed, etc."
> 
> 
>
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/).