Passer la navigation

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

This support ticket is created Il y a 4 years, 2 months. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par - Il y a 4 years, 2 months.

Assisté par: Shane.

Auteur
Publications
#2435053

Tell us what you are trying to do?
On this page (plus a bunch of other post forms): lien caché
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

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!