Skip Navigation

[Resolved] On a post form, I can't seem to make the feature image a required field

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

Last updated by paulL-5 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2435053

Tell us what you are trying to do?
On this page (plus a bunch of other post forms): hidden link
I want to make the feature image upload a required field in order to complete the form, but I don't see option for it.
Many thanks in advance.
Paul

#2435221

Shane
Supporter

Languages: English (English )

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

Hi Paul,

Thank you for getting in touch.

In order to make the featured image field required you will need to make use of our Toolset Forms Hook for field validation.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Also there is an example that shows you how to validate the featured image field and check if its empty.

Thanks,
Shane

#2436695

My issue is resolved now. Thank you!

I was able to adapt that code easily enough to amend the message and apply the rule to all the forms rather than a specific one.
Perfect thank you!