I’m using the gform_after_submission hook to send data to a 3rd party.
The 3rd party sends me a 409 response if the email address id duplicated.
My question is. How do I stop the form from redirecting to a confirmation page and display a error message instead? I don’t think it’s a hard one, but I didn’t manage to find the answer.
i’m just a user too. my guess would be you’d need to perform the remote submission with the hook for validation, that way you can return a failure code at that point.
You won’t be able to use gform_after_submission for this. The confirmation is already shown when that hook is run. You’ll need to use something earlier like gform_pre_submission or gform_validation.