preloader

email confirmation field - AppGlut

Home Support FormGlut Feature Request email confirmation field

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2801
    Farzad
    Participant

    Can you add email confirmation field

    #2806
    AppGlut
    Keymaster

    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

    #2816
    Farzad
    Participant

    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

    #2817
    AppGlut
    Keymaster

    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

    • This reply was modified 3 weeks, 4 days ago by AppGlut.
    • This reply was modified 3 weeks, 4 days ago by AppGlut.
    • This reply was modified 3 weeks, 4 days ago by AppGlut.
    • This reply was modified 3 weeks, 4 days ago by AppGlut.
    • This reply was modified 3 weeks, 4 days ago by AppGlut.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.