Tell us what you are trying to do?
I'm trying to make user sign up fields required. They include: first name, last name, phone, email, password terms agree checkbox. The email and password fields are already required but it's the other fields I need force required.
I'm using this JS code in the form but it only works for first and last name.
jQuery( document ).ready(function() {
jQuery("input[name='first_name']").prop('required',true);
jQuery("input[name='last_name']").prop('required',true);
jQuery("input[name='phone']").prop('required',true);
jQuery("input[name='terms']").prop('required',true);
});
Is there any documentation that you are following?
https://toolset.com/forums/topic/cred-user-field-not-required/
Thank you
Hello,
Since it is a custom codes issue, please share a test site with the same problem, fill below private message box with login details.
Also point out those URLs:
- where I can see the result in frontend
- Where I can edit your custom JS codes
I need to test it in a live website. thanks
Thanks for the details, I have changed the custom JS codes from:
jQuery("input[name='phone']").prop('required',true);
jQuery("input[name='terms']").prop('required',true);
To:
jQuery("input[name='phone']").prop('required',true);
jQuery("input[name='terms[]']").prop('required',true);
Please test again, check if it is fixed, thanks
My issue is resolved now. Thank you!