Đạt Nguyễn on "[Plugin: Contact Form 7 Confirm Email Field] No error message displayed"

ساخت وبلاگ

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://wordpress.org/plugins/contact-form-7-confirm-email-feild/

vallabh vyas
Member
Plugin Author

Posted 6 months ago #

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.

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?

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.'), ); retu $messages;
}

vallabh vyas
Member
Plugin Author

Posted 4 months ago #

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

Đạt Nguyễn
Member
Posted 11 minutes ago #

Thanks @Team-ok

- - , .

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 130 تاريخ : چهارشنبه 28 بهمن 1394 ساعت: 12:52