The Set-Cookie HTTP response header

Hello,

New to gravity forms and looking for some help regarding the setting of cookies on the browser. We are calling an API via gravity forms and this API responds with the Set-Cookie response header to set a cookie that is needed in any subsequent requests. However, the cookie isn’t being set on the browser?

Is there any configuration that needs to be set? Do we need to add any code on the gform_after_submission hook to set the cookie on the browser?

Cheers!
Alex

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

Hi Alex,

Is there any configuration that needs to be set? Do we need to add any code on the gform_after_submission hook to set the cookie on the browser?

Are the subsequent requests ones that you want to occur based off the same form entry submission?

At first glance, it’s something that Gravity Flow’s outgoing webhook could give you an easy solution to map part of the response into a field value. Plus, with multiple webhook steps you can control order/timing of those to ensure subsequent ones that need the set-cookie value occur after.

If you did need to use a snippet of code - it would probably be gravityflow_entry_webhook_response_mapping with a merge tag in the value to let you define the specific header you want to get instead of from the response body.

Drop our support team a message if you do go that route and run into any issues or need for code example.

Cheers,
Jamie