Compare email field values to ensure they are the same

Home Forums Quform WordPress Compare email field values to ensure they are the same

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13871
    iupui95
    Participant

    I added this code to my child theme function.php file and it worked fine for one form.
    I now have two forms needing this function, but when I duplicated the code below and changed the field ID values, the site wouldn’t load anymore.
    Ideas?

    add_filter(‘iphorm_element_valid_iphorm_2_5’, ‘mytheme_confirm_email’, 10, 3);

    function mytheme_confirm_email($valid, $value, $element)
    {
    if ($value != $element->getForm()->getValue(‘iphorm_2_8’)) {
    $valid = false;
    $element->addError(‘The email addresses do not match’);
    }

    return $valid;
    }

    #13883
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13906
    iupui95
    Participant

    Changing the function name worked. Thanks!

    Joe

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy