- This topic has 8 replies, 2 voices, and was last updated 6 years, 4 months ago by
Support. This post has been viewed 1965 times
-
AuthorPosts
-
June 25, 2020 at 5:32 am #10033574
Robcar10
ParticipantHello,
1st, I would like to thank you for the time and solutions you guys provided on my previous ticket.
After making all changes, everything works. Today I was pointed out that the form can be submitted even if no weeks are checked off.
I check my HTML code and I do have the require function on each checkbox select.
Could you please revise it please?
Thank you!
Template Version: 7.5.0June 25, 2020 at 6:02 am #10033577Support
KeymasterHello,
Great!
Try the following:
First change the code of “No White Space” rule at “view.contact.js” to:
// No White Space $.validator.addMethod("noSpace", function(value, element) { console.log( $(element).attr('data-plugin-multiselect') ); if( $(element).attr('required') && typeof $(element).attr('data-plugin-multiselect') == 'undefined' ) { return value.search(/[a-zA-Z0-9À-žа-яА-ЯёЁα-ωΑ-Ω\s\u0621-\u064A\u0660-\u0669 ]/i) == 0; } return true; }, 'Please fill this empty field.');Add the
ignoreoption in the recaptcha v3 code:/* Contact Form: reCaptcha v3 */ $('.contact-form-recaptcha-v3').each(function(){ $(this).validate({ ignore: [], rules: { creditcard: { .. .... ....Please try that and let us know if you need further assistance.
Kind Regards,
Rodrigo.
If you are satisfied with EZY HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads
June 27, 2020 at 6:11 am #10033611Robcar10
ParticipantSo I forgot to reply to this.
I copied the code as indicated but it seem to not have solve the issue. Form can still be submitted with out any selections of weeks.
Thanks for the help!
June 27, 2020 at 6:19 am #10033612Support
KeymasterHello,
I inspected your code now and it’s wrong in the recaptcha v3 part of code.
You have:
/* Contact Form: reCaptcha v3 */ $('.contact-form-recaptcha-v3').each(function(){ $(this).validate({ rules: { creditcard: { ignore: [], required: true, creditcard: true } },And the correct is like I mentioned in my previous reply.
Please try that and let us know if you need further assistance.
Kind Regards,
Rodrigo.
If you are satisfied with EZY HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads
June 27, 2020 at 8:04 am #10033616Robcar10
ParticipantThis reply has been marked as private.June 27, 2020 at 8:05 am #10033617Robcar10
ParticipantThis reply has been marked as private.June 29, 2020 at 10:58 pm #10033628Support
KeymasterHello,
To remove the required from specific fields (with select2) please change the
ignore: []in the JS file to:ignore: '.ignore-this-class',
And in the fiels (select2) you want to ignore add the class
ignore-this-class, for example:<select class="form-control populate ignore-this-class" multiple="multiple" data-plugin-multiselect................
Please try that and let us know if you need further assistance.
Kind Regards,
Rodrigo.
If you are satisfied with EZY HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads
June 30, 2020 at 1:46 am #10033635Robcar10
ParticipantThis reply has been marked as private.June 30, 2020 at 5:33 am #10033639Support
KeymasterHello,
I guess what im trying to say is: If a parent is trying to sign up their kid to camp, they must select a minimum of one week, regardless of which camp they select, but at the same time, we don’t want to receive any forms without any weeks selected.
Probably is possible make that with some custom JS code, by add/removing the
ignore-this-classfrom fields when at least one select option is selected. But unfortunately this is out of our support can offer, since this is more complicated to do and will require too much time to accomplish. This is based on ThemeForest support policy. We hope you understand!But probably my tip above regarding custom JS is the best way to accomplish that. We hope this helps!
If you have any further questions feel free to contact us.
Kind Regards,
Rodrigo.
-
AuthorPosts
This topic is marked as "RESOLVED" and can not rceive new replies.