Jump to content

Pre-populating Form Data

Recommended Posts

I have two questions about customizing Squarespace forms, and I'm not sure either is possible:

  1. We often send existing contacts to the form and would like to auto-populate form values based on their information. Ideally, we'd send the contact a link to the correct page with a parameter for their email address – website.com/form-page?em=chris@example.com – and some javascript would parse the parameters and pre-populate the Email field on the form
  2. We'd also like to include some metadata about the form, like the version number of the form they're submitting since they frequently change. Ideally, we'd put a Version Number field on the form with a default value (e.g., "v1.0") and mark it as hidden, but that doesn't seem to be possible with Squarespace forms
Link to comment
  • Replies 2
  • Views 2.8k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

@AndresB - I think I worked it out for #2. You can add as many hidden fields as you like, just select to add a hidden field. Give these fields different labels and their field names will change respectively. Then assign values to these hidden fields in the url string and they get passed successfully. image.png.458c03483b9379a45040ce12fb4ef230.pngimage.png.72b34d7e8f77f0b119645bf4b56889cc.png

Edited by Vivienne13
Link to comment
  • 2 months later...
On 8/27/2023 at 4:34 PM, Vivienne13 said:

@AndresB - I think I worked it out for #2. You can add as many hidden fields as you like, just select to add a hidden field. Give these fields different labels and their field names will change respectively. Then assign values to these hidden fields in the url string and they get passed successfully. 

Hi

I am trying to do this with the new newsletter block, but that form doesn't allow you to add hidden fields.

Users are redirected to our newsletter form with the url .... /newsletter?fname=@First name&lname=@Surname&email=@Email

Any suggestions on how to pre-populate the newsletter block form with these params?

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.