Jump to content

Add Form Field To Submit Redirect URL

Go to solution Solved by creedon,

Recommended Posts

Is it possible to add a form's email field value to the query string parameter on the form submission redirect URL?

For example:  If the form has an email field,  I want the form submission redirect URL to be: 

I would image, if it's possible, it would be formatted something like this:  

Is this possible?


Edited by mrwill
Link to comment
  • 4 months later...
On 3/23/2022 at 7:38 AM, bryansinger said:

Trying to redirect to Calendly auto-fill and they are after the "@" version, as opposed to "%40".  If there's a workaround

I have updated my cited code in my November 17, 2021 post earlier in this thread.

There is a new flag to control if the email is encoded or not.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

Link to comment
  • 4 weeks later...
2 hours ago, wanderingjam said:

Have added link to .js file and added code to specific page.

Would love some help!  Thanks!

You discovered a bug in my twcsl code! Thank you.

I believe I have corrected the issue.

Please reinstall twcsl per the instructions, making sure to download the new version, and let me know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

Link to comment
5 minutes ago, wanderingjam said:

@creedon One more question for you:

If I want to change the URL parameter variable name from Email to SQF_EMAIL, where would I need to make that change?  i.e. I want it to pass through as redirecturl.com/redirectpage?SQF_EMAIL=<email address>


Line 39 just needed to set label variable to my own value.


Thanks for this!

Link to comment
  • 7 months later...

@creedon back for more here.  Trying to tweak your code to work for form fields other than email.  Specifically, I have a hidden field whose value I'd like to pass as a parameter on redirect.  The hidden field does have a name, so I assumed I would just change the value from .email to .<hidden field name> however I'm not able to get it to work as hoped.

P.S. I had also looked at passing a text field in my form but found that those fields do not have a name attribute, only an id.  Perhaps there's a tweak to make where I can use ID to identify the field I'd like to pass?


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.