Updating Form Field After Submission [RESVOLED]

Hi,

We have an authentication system outside of Wordpress (shibboleth) that stores the authenticated users email in the $_SERVER[‘REMOTE_USER’] PHP variable. I want to have a hidden field in the form that I look for and update with this value. I would then send the form data to a webhook to be processed and stored in a remote database.

Is there a hook that I would tie into to accomplish this?

You can use the following filter to run your code to get the value from $_SERVER[‘REMOTE_USER’] and return it to the hidden field before saving it to the entry: gform_save_field_value - Gravity Forms Documentation

And you can use this hook to run any custom code to send the data to your remote database: gform_after_submission - Gravity Forms Documentation

You may want also to enable logging and include custom logging statements in your code to ensure it runs when expected and dump information in key parts in case that you may need to debug the code: Custom Logging Statements - Gravity Forms Documentation

1 Like

That is what I was looking for. Thanks for the prompt reply.

1 Like