Skip Navigation

[Resolved] Make field required.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by AndreG3332 5 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1209450

I want to make my first name and surname fields required fields in a user form. This is a default user with no additional fields. How do i do it?

#1209506

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You would have two choices.

One is to add a little JS that added the required attribute to the fields in question, which would add native browser-based validation. (See hidden link.)

The other would be to add server-side validation using the cred_form_validate hook ( https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate).

(A final option for the long term would be to request that in Forms it would be possible to directly add attributes to form fields: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/)

#1222256

My issue is resolved now. Thank you!