Setting a custom cookie on form submission

I want to set a custom cookie when I submit a specific form. How can I do that please?

Thank you.

Hi David.

  • Are you using AJAX submission?
  • Are you using a text confirmation, or redirecting to a new page for the confirmation?

Once we know those things, we can help you with the code to set a cookie after the form is submitted. Thank you.