Disable validation [RESOLVED]

Hi…

Is there a way to disable validation on a form when it’s submitted? I’d like to keep the Required labels on certain fields, but just not validate the form at all.

Long story short, I have a ton of custom validation and it’s just easier to do it all that way.

Thank you!

/kevin

You can’t disable validation, but you could use the gform_validation filter to override the validation result for all or one form:

All Forms

add_filter( 'gform_validation', function( $validation_result ) {
    $validation_result['is_valid'] = true;
    return $validation_result;
});

Single form using the form ID

add_filter( 'gform_validation_ID', function( $validation_result ) {
    $validation_result['is_valid'] = true;
    return $validation_result;
});

You can use the following documentation to determine where to put your Custom PHP:

2 Likes

Hi, Chris–

This is absolutely brilliant! Thank you so much for this. You’re a lifesaver. :sign_of_the_horns:

/kevin

2 Likes