Skip Navigation

[Resolved] required fields in front end forms

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to make some optional custom fields required in a Toolset form.

Solution:
Currently, the required-ness of a field in a Toolset Form comes from its field's settings in Toolset->Custom Fields. Our developers are aware of this limitation and there is a feature request to allow implementing it independently of the fields settings. I am adding this ticket as a vote to the developers' board.

In the meantime, you can implement one of the following solutions:

This support ticket is created 4 years 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Author
Posts
#1886237

I have a custom post type with non-required fields. From this I would like to create a cred form with all required fields (front-end only). It's possible?

#1886685

Hello and thank you for contacting the Toolset support.

Currently, the required-ness of a field in a Toolset Form comes from its field's settings in Toolset->Custom Fields. Our developers are aware of this limitation and there is a feature request to allow implementing it independently of the fields settings. I am adding this ticket as a vote to the developers' board.

In the meantime, you can implement one of the following solutions:
- Using custom Javascript code: You can add custom Javascript code that will set the fields to be required. Check this example for inspiration https://toolset.com/forums/topic/cred-how-to-make-fields-required/#post-195708
- Hiding the submit button until all fields have content. You can wrap the submit button inside a conditional group that will check that all the fields have values.

I hope this helps. Let me know if you have any questions.

#1887045

My issue is resolved now. Thank you!