Skip to content

Instantly share code, notes, and snippets.

@bugnumber9
Last active December 17, 2025 12:54
Show Gist options
  • Select an option

  • Save bugnumber9/f0d85e0cc861b81ffd14928ae4948a1c to your computer and use it in GitHub Desktop.

Select an option

Save bugnumber9/f0d85e0cc861b81ffd14928ae4948a1c 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