Skip to content

Instantly share code, notes, and snippets.

@annuman97
Created September 24, 2022 09:17
Show Gist options
  • Save annuman97/caaf35b62fe26ce6fd3586319ffa786c to your computer and use it in GitHub Desktop.
Save annuman97/caaf35b62fe26ce6fd3586319ffa786c to your computer and use it in GitHub Desktop.
add_filter('fluentform_validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) {
$target_id = [59,60];
$target_form_id = 0;
foreach($target_id as $id){
if($form->id == $id){
$target_form_id = $id;
}
}
if($form->id != $target_form_id ) {
return $errorMessage ;
}
if( $formData['email'] != $formData['email_1'] ){
$errorMessage= ['Error! Email does not match'];
}
return $errorMessage;
}, 10, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment