Skip Navigation

[Resolved] How to make post fields required?

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

Problem:

The issue here is that the user wanted to make their post fields required in Toolset Forms.

Solution:

We actually have a hook for this and you can set the field to be required by using out validation hook to ensure that its not being submitted empty.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

This support ticket is created 6 years, 3 months 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 – 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 1 reply, has 2 voices.

Last updated by Shane 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#954597

J S

I can see how to specify custom fields as being required in the admin, they are then required in the auot-generated CRED form. But how do you mark generic WP Post fields as required in the CRED form?

For example, I am using the Toolset Classifieds demo site, and can't figure out how to make the Ad forms require a decription and main image...how do I do this?

Thanks

#954701

Shane
Supporter

Languages: English (English )

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

Hello,

Thank you for contacting our support forum.

We actually have a hook for this and you can set the field to be required by using out validation hook to ensure that its not being submitted empty.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Please let me know if this helps.
Thanks,
Shane