Sauter la navigation

[Fermé] Exceute a function before loading the form

This support ticket is created Il y a 2 années et 5 mois. 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.

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Nigel Il y a 2 années et 5 mois.

Auteur
Publications
#2526269

Dear Sir/Madam,

I completely reviewed the article https://toolset.com/documentation/programmer-reference/cred-api/ but I could not find the API that I wanted.

I have a form, and I want to update some fields in the form before I load it. Is it possible to do?

Best regards,

Kelvin.

#2526841

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

There isn't a hook that is triggered before the form loads, but you could register a custom shortcode and insert the shortcode near the top of the form: that code would run before the rest of the form is processed.

See https://developer.wordpress.org/plugins/shortcodes/

(Note you can also provide default values for forms to publish posts; edit forms will take existing values of fields and display them in the form.)

Le sujet ‘[Fermé] Exceute a function before loading the form’ est fermé à de nouvelles réponses.