Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Replacing default form error messages
Tagged: error messages, validation, wcfm, woocommerce frontend manager, woocommerce multivendor marketplace
- This topic has 4 replies, 3 voices, and was last updated 5 years, 6 months ago by eArtisan.
- AuthorPosts
- May 5, 2019 at 6:19 pm #60753hello4Participant
Hello there,
Could you please show me how to replace the default form error messages (the exhaustive list of required fields), with a custom error message? Something like “Please complete the required fields”.
Thanks and regards,
- May 9, 2019 at 6:17 am #61264WCFM ForumMember
Hi,
Please use this snippet –
function wcfm_custom_0905_translate_text( $translated ) { $translated = str_ireplace( 'This field is required.', 'Please complete the required fields.', $translated ); return $translated; } add_filter('gettext', 'wcfm_custom_0905_translate_text'); add_filter('ngettext', 'wcfm_custom_0905_translate_text');
Thank You
- May 9, 2019 at 7:37 am #61294hello4Participant
Hello,
Thanks for the reply, but that’s not what I meant. Please see the attached screenshot. Instead of all those messages, I want to display one simple message, something like ‘Please complete the required fields’ or something. How can I do that?
Thanks and regards,
Attachments:
You must be logged in to view attached files. - May 12, 2019 at 3:47 pm #61952WCFM ForumMember
Hi,
This is not possible using default validation system.
To show one message have to write separate validation code.
Thank You
- May 12, 2019 at 4:09 pm #61956eArtisanGuest
Hello again,
Could you please explain how to write a new validation system (just the file names and other things to be changed) as the default validation messages look pretty basic and don’t look great at all?
Thanks and regards,
- AuthorPosts
- The topic ‘Replacing default form error messages’ is closed to new replies.