Saltar navegación

[Resuelto] Make field required.

This support ticket is created hace 5 años, 9 meses. 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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por AndreG3332 hace 5 años, 9 meses.

Asistido por: Nigel.

Autor
Mensajes
#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

Idiomas: Inglés (English ) Español (Español )

Zona horaria: 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 enlace oculto.)

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!