Jump to content

Form value in cookie determines landingpage.

Recommended Posts

Site URL: https://harp-plum-3tmk.squarespace.com/attendance

Dear all,

I'm currently frolicking to create a form in which a check is done to the choices of the visitor which determines on which page you end up.

The idea is that there are 2 questions (can be more) which has to be answered No. If the form contains 1 answer yes you end up being denied.

With JS i want to store the first and last name in a cookie, which i am going to use on the landing page as a thank you message.
Creating a loop to validate the form to check if all radio buttons are checked No.

I have written a small part JS code but i can't figure out how to run the custom JS code before the code that i generated by Squarespace.
The JS code not not complete yet, but if someone has experience and would like to help me i would appreciate it a lot.In a test environment i have setup an example, please let me know if you want to take a look and i will give you access.

Link to comment
  • Replies 5
  • Views 446
  • Created
  • Last Reply

Hi there, please grant temp password so I can have a look

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
2 hours ago, Lickyshot said:

With JS i want to store the first and last name in a cookie, which i am going to use on the landing page as a thank you message.

The first and last name are considered personally identifiable information (PII), so in the interests of protecting end user privacy, this information should not be stored in a cookie.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
5 minutes ago, paul2009 said:

The first and last name are considered personally identifiable information (PII), so in the interests of protecting end user privacy, this information should not be stored in a cookie.

You are completely right @paul2009 didn't consider that. Thank you for mentioning it.
I wanted to store this information for a followup page that i have in mind.

A little explanation what i have in mind. The data of the form is stored in a Excel in G-Drive.
A followup form will be created which will ask which person(s) you have spoken to that you can fill in later, but have to keep the page open.
With the name stored in a cookie you trace back who filled in the form and to whom they have spoken to. I hope this is not too confusing.

As an alternative i could combine the first and last name and create a unique hash code that is stored. By doing so i can relate both results.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.