Skip to content

Instantly share code, notes, and snippets.

@dexit
Forked from bugnumber9/form
Created December 17, 2025 12:54
Show Gist options
  • Select an option

  • Save dexit/ef482f42d7593c9858efc63718dc9978 to your computer and use it in GitHub Desktop.

Select an option

Save dexit/ef482f42d7593c9858efc63718dc9978 to your computer and use it in GitHub Desktop.
add_action( 'elementor_pro/forms/validation', function( $form_record, $ajax_handler ) {
if ( 'Test Form 1' !== $form_record->get_form_settings( 'form_name' ) ) {
return;
}
$fields = $form_record->get('fields');
$email = $fields['email']['value'];
if ( email_exists( $email ) ) {
$form_record->update_field( 'validation', 'value', 'yes' );
} else {
$form_record->update_field( 'validation', 'value', 'no' );
}
return $form_record;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment