Skip to Content

Creating a Cookie Based Form Popup


Form Popups can serve as an excellent lead generation tool if used correctly...

Adding a cookie-based form popup to your website can be a tremendous lead generation tool. However, a form popup must be carefully implemented in order for it to add value to a web page rather than detract from it.

This article provides you with the code you need to add a cookie-based form popup that can be set to appear after a certain interval of time and also hides itself when the user returns to your website by tracking cookies. You can use the form for anything and modify it to meet your needs.

Below is the code and styling you need to implement a cookie-based popup form on your website.

Step 1 - Add the HTML below to the footer of your homepage


Step 2 - Download the CSS below and include it in your web page

  form-popup.css

Step 3 - Add the following includes to the header of your homepage


Scott Madara
Contributions Editor here at Solodev. Want to be featured on the Solodev Blog? Get in touch.
Follow me on Twitter

Sign up to explore

Create an account in seconds and start building today.

Sign up for Solodev