Skip Navigation

[Cerrado] Checkboxes required

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

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
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 respuestas, has 2 mensajes.

Last updated by Adriano hace 9 años, 2 meses.

Assisted by: Adriano.

Autor
Mensajes
#244035

Hello,
how can I make the field with checkboxes required?
Best regards,
Michael

#244076

The checkboxes is one of Types fields you can not set as required. If you need to make this required in CRED, I would recommend you to use CRED API to achieve that: https://toolset.com/documentation/user-guides/cred-api/

The cred_form_validate hook should do that.

#244080

Why only for this type it is not possible to set up the required field? I've chosen Types to could set up the forms without coding, I have no idea how to use CRED API and hooks.

#244282

That's because the logic is very hard for this kind of field, so we moved this as feature request to a future release.

Unfortunately, for checkboxes, you must use some PHP code. Using the hook I provided for you, you must replace $fields['my_field']['value'] with the name of your checkboxes field.

Please let me know if you are satisfied with my answer and if I can help you with any other related question.

El debate ‘[Cerrado] Checkboxes required’ está cerrado y no admite más respuestas.