Skip Navigation

[Résolu] How do I make First Name and Last Name required?

This support ticket is created Il y a 6 années et 8 mois. 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 réponses, has 2 voix.

Last updated by Shane Il y a 6 années et 8 mois.

Assisted by: Shane.

Auteur
Publications
#555816

Tell us what you are trying to do?
Make CRED user form that has First Name and Last Name required.

What is the link to your site?
hidden link

I have required='true' but the fields are not required. Why?

#555844

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

Thank you for contacting our support forum.

Actually you can make these fields required by using our CRED custom validation hook.

https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

This hook should allow you to check if the fields are empty and return an error prompt to the user so that they can fill in the required information.

Thanks,
Shane

#555845

So you're telling me that for a toolset I paid hundreds of dollars for, I have to write hooks just to make a standard WP user meta required?

#555853

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

This is because the fields themselves are not required by wordpress so that non-requiremen is passed through to CRED.

If the fields are required by wordpress they will be required.

Thanks,
Shane

#555855

That doesn't explain it. Because fields made by types can be made required in cred. This is a serious flaw in your product. At every turn, things that other forms like Gravity Forms have for half the cost, you don't provide.

#555856

And you even have a hook for it, but your company chose not to include it in its final product.

#555860

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

That is because we are working to make user creation more accessible and easier, we are continuously trying to improve on our Products and I could open a feature request for this.

But for now the way to do it is by using a hook to make the fields required.

Thanks,
Shane

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