Navigation überspringen

[Gelöst] Make field required.

This support ticket is created vor 5 Jahren, 11 Monaten. 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.

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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von AndreG3332 vor 5 Jahren, 10 Monaten.

Assistiert von: Nigel.

Author
Artikel
#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

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: 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 versteckter 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!