-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code not working #1
Comments
Yes you forget the PHP part in your function.php file like this : add_filter('fluentform_validate_input_item_input_email',
function($errorMessage, $field, $formData, $fields, $form) {
$target_form_id = 1;
if($form->id != $target_form_id ) {
return $errorMessage ;
}
if( $formData['email'] != $formData["email_1"] ){
$errorMessage= 'The emails doesn't match.';
}
return [$errorMessage];
},
10, 5); |
Still the code not working! Even though the emails are correct, it's not submitting! See here: https://prnt.sc/vc6158 If the email is wrong, the error shows fine: https://prnt.sc/vc61xb Code Added to function.php: https://prnt.sc/vc63wr |
@techjewel Can you please help? |
Try this : add_filter('fluentform_validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) { $target_form_id = 8; if($form->id != $target_form_id ) { return $errorMessage ; } if( $formData['email'] != $formData['email_1'] ){ $errorMessage= ['Error! Email does not match']; } return $errorMessage; }, 10, 5); If it does not work can you share your form URL link? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added the code as is via Code Snippets, but form still accepts gmail and goes to our thank you page and adds the entries to the database. Is there anything i missed?
The text was updated successfully, but these errors were encountered: