Skip Navigation

[Resolved] Makes Fields required

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by TomW5440 1 year, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2458665

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

#2458881

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

#2460417

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

#2461415

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.