cancel my form using function hook
-
i want to cancel my form using function hooks
add_action( 'forminator_custom_form_submit_before_set_fields', function( $entry, $form_id, $field_data_array ){ $phone = $_POST['phone-1']; global $wpdb; $results = $wpdb->get_results('select * from <code>wp_users</code> where user_login = "'.$phone.'"'); if ( $results ) { var_dump("same number exits"); return false; // cancel the form } else { var_dump('success!'); } },20 , 3 );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘cancel my form using function hook’ is closed to new replies.