• Resolved team-ok

    (@team-ok)


    Hi,
    the plugin works fine, but it’s not displaying any error message when two different mail addresses are entered.
    In your code there’s the wpcf7_confirm_email_validation_filter function where you’re using wpcf7_get_message( ‘invalid_confirm_email’ ) to get the error message. But ‘invalid_confirm_email’ seems to be undefined.
    When I enter a string instead of the wpcf7_get_message function, the message is being displayed.

    https://ww.wp.xz.cn/plugins/contact-form-7-confirm-email-feild/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author vallabh vyas

    (@vallabh85)

    Hi,

    Can you please tell me which WordPress version and contact form 7 version you are using.

    I had tested my plugin with latest version of
    Wordpress version 4.2.3
    Contact Form 7 Version 4.2.2

    It is working fine for me. I am getting error message also.

    Thread Starter team-ok

    (@team-ok)

    Hi,

    I’m using the same wordpress and CF7 version.
    I searched in all files of CF7 and of your plugin: there’s no ‘invalid_confirm_email’ error message defined, there’s only ‘invalid_required’ and ‘invalid_email’.
    There’s also no translation option for ‘invalid_confirm_email’ in the messages tab of the CF7 settings in the wordpress backend.
    Maybe you have any other CF7 plugins installed where the message is defined?

    Thread Starter team-ok

    (@team-ok)

    Hi,
    I think I have solved the problem. I added the confirm_email_messages function and hooked it in the wpcf7_messages filter. Now I can enter a custom message in the backend and it appears when the email addresses don’t match.
    Maybe you want to add the code below?

    add_filter( 'wpcf7_messages', 'confirm_email_messages');
    
    function confirm_email_messages($messages) {
        $messages['invalid_confirm_email'] = array(
                'description' => __('The email addresses do not match.'),
                'default' => __('The email addresses do not match.'),
            );
    
            return $messages;
    }
    Plugin Author vallabh vyas

    (@vallabh85)

    Resolved

    Hi team-ok,

    WHERE did you set up your code (line number)?
    If I use your code, the error shows always, also when addys match…

    thanks in advance, Chris

    Thanks @team-ok

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘No error message displayed’ is closed to new replies.