Hi,
First thing first, I am very sorry for such an inordinate delay in responding to your message. The entire team was away for the last week on account of the biggest vacation in our part of country.
Good thing is that we are now back and I should be able to take care of all your queries/ concerns in much shorter span of time. Please give us some time to revert on this.
Thanks,
Neha
Hi,
Thanks for all your patience.
Instead of using any hook or filter, you can directly insert the below code in our plugin in order to meet your requirement. We too will be implementing this functionality in our next update, so need not to worry while updating next time.
Please insert this javascript under- plugin ->class->class-wc-Woocommerce-Catalog-Enquiry-frontend.php
function validateEmail($email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test( $email );
}
above this function
function submitthis(str) { ……}
and put this line of jquery
if( !validateEmail(email)) {
document.getElementById(‘msg_for_enquiry_error’).innerHTML='<?php echo __(‘Please Enter Valid Email Id’, $WC_Woocommerce_Catalog_Enquiry->text_domain);?>’;
document.getElementById(‘woo_user_email’).focus();
return false;}
under function submitthis(str) {…} function
below the code
if(email == ” || email == ‘ ‘) {
document.getElementById(‘msg_for_enquiry_error’).innerHTML='<?php echo __(‘Email is required field’, $WC_Woocommerce_Catalog_Enquiry->text_domain);?>’;
document.getElementById(‘woo_user_email’).focus();
return false; }
Please do let me know, if this solves the issue.
Thanks,
Regards
Thread Starter
sjain
(@sjain)
Perfect!
Thanks a lot for this solution. I am marking this topic as resolved.
Hey,
Good to know this!!!
Just one request from our end, a 5/5 rating would definitely help us to reach out more users 🙂
Always there to help you.
Thanks,
Neha
Hey @sjain,
We are back with the latest version 2.3.0 of our Plugin and the good news is we have considered the “EMAIL VALIDATION” issue.
Please recheck from your end and I would request a 5/5 rating would definitely help us to reach out more users 🙂
Thanks,
Neha