0

I need to add custom text input into every Gravity Form on site (captcha-like) via PHP. And I should throw error if user submitted bad answer into this input.

Is it possible to do it in Gravity Forms? If yes - what filters should I use for this?

1

Not a direct answer to your question but if the goal is anti-spam or anti-bot protection, simply use the built-in honeypot from Gravity Forms.

https://www.gravityhelp.com/documentation/article/form-settings/

Otherwise, I believe you want the gform_pre_render hook. This is executed before the form is displayed and can be used to manipulate the form object directly.

More info on Gravity Forms' documentation site https://www.gravityhelp.com/documentation/article/gform_pre_render/

Not the answer you're looking for? Browse other questions tagged or ask your own question.