email confirmation field

in Plugin Feature Request

This topic has 3 replies, 2 voices, and was last updated 2 years ago by AppGlut.
Viewing posts 1 – 4 (of 4 total)
#4124

Can you add email confirmation field

#4130

Hello Farzad,

Thanks for writing to us. Can you please elaborate more on this email confirmation field feature/requirement? It will be very helpful if you elaborate on this.

Thank you and kind regards

#4131

In some forms, there is a field to enable confirming emails to make sure they don't misspell. it will check if both fields have the same email address without any spelling error. here is an example: https://ibb.co/kKSS8xx

#4132

You can achieve it by putting the below filter code in your active theme functions.php file and adding an extra Email field naming Name Attribute email_1 as I image attached from Advance Option ,

add_filter('formglut/validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) {
    $target_form_id = 261;
    if($form->id != $target_form_id ) {
     return $errorMessage ;
     }
  if( $formData['email'] !=  $formData['email_1']  ){
   $errorMessage =  ['Error! Email does not match'];
   }
  return $errorMessage; }, 10, 5);
Here please put $target_form_id = 261;
your form id or shortcode id.  Please check and let me know, if it works for you.

Thank you and kind regards

Viewing posts 1 – 4 (of 4 total)
You must be logged in to reply to this topic.