Webflow Joe

F'in Sweet Webflow Hacks

Submit a cookie as hidden field on a Webflow form

What can this be used for?

  • See what pages the user visited before the contact form was submitted
  • See what button(s) the user clicked while on your website
  • Send any additional information about the user through the contact form

Overview

This is one of many part 2 articles on cookie management. Our article about setting of cookies will show you how to give your website visit cookies. This article shows you how to submit a cookie you've set via form submissions.

Step 1

Add a Webflow form component page

Inside the .Form wrapper, add a code embed block.

Step 2

Add a hidden input field to the embed block

What the heck does that mean?

Let's learn by going step by step through the code

EXPLANATION

Step 3

Set the embed block to display none

Add a class to your embed block and set it to display : none. There is no reason for us or the user to see this block. It will work with the form regardless of display setting

Nice! You're done. See it working.

Interested in more f'in sweet Webflow hacks?

Get an alert when we post a new one.
We have 20 posts scheduled to send throughout the next 3 months.

Nice! We'll let you know when a new hack is available.
Something went wrong while submitting the form. Please email us directly at projects@finsweet.com

Want Finsweet to build your Webflow site?

We're Webflow Experts!