Using GF as a login form to an external website (with POST instead of GET)

Hi all,

I’m trying to use GF to submit a login and password to an external url.

When using an external url as confirmation in GF, as seen on this topic, the variables are perfectly sent via GET.

But I wanted to use POST, in order to keep login & password values hidden.
So I tried following this tutorial. It uses the hook gform_after_submission.
And when I try to retrieve the POST variable content on the external website, it’s empty.

After testing, and if I understand it right, it seems that the redirect type confirmation in GF prevents the code in the gform_after_submission hook to be executed.
If I use a standard text confirmation, this code is executed, but I’m not redirected to the targeted url.

So I also tried using gform_post_process and gform_confirmation instead of gform_after_submission, but it didn’t work.

I’m not a developper, and I might have disregarded something essential.
But isn’t there a way to send data in POST while “following” it to the external destination page ?

Sounds like you’re looking to change the action parameter of your form. We’ve got an awesome solution for that.

Here it is in action:

Thank you so much Dave.

First, for rephrasing my question in simple terms (“trying to change the action parameter” would have been a way better title for this thread).
And then, for taking the time to shoot this loom, giving me the solution. Your plugin works like a charm.

Have a great day !

2 Likes

Very happy to help, Ben!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.