Jump to content

How to generate consecutive "serial numbers" in forms

Recommended Posts

We use various forms that visitors fill out on our site. How can we insert a consecutive "serial number" or form number so that each new filled out form has a number (say 100 for the first, 101 for the second, 102 for the third etc) that is generated automatically, not by the person filling out the form. Thank you in advance for any help with this. 

Link to comment
3 minutes ago, JeffSB said:

We use various forms that visitors fill out on our site. How can we insert a consecutive "serial number" or form number so that each new filled out form has a number (say 100 for the first, 101 for the second, 102 for the third etc) that is generated automatically, not by the person filling out the form. Thank you in advance for any help with this. 

You may have to store the submission to google spreadsheet and set the increase number there

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 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

How critical is it that each sequence number is different? There are some methods I can think of client-side that would have a pretty low likelihood of duplicated numbers. For example one is time based. Use the date and time to create a "serial number". 20210518184445. They wouldn't be in linear sequence. You'd need to decide if that would be a problem. That brings up a second question. Do you care about the number itself. Size for example? Or where the numbers start?

Then with a hidden form field and some Javascript to fill in the hidden field you'd have a "serial number" come along with the form. The Javascript would require the business plan or above.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.