-
-
Save bugnumber9/f0d85e0cc861b81ffd14928ae4948a1c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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