mrwill Posted November 16, 2021 Share Posted November 16, 2021 (edited) 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: https://example.com/?email=test@example.com I would image, if it's possible, it would be formatted something like this: https://example.com/?email={{EmailFieldName}} Is this possible? Thanks! Edited November 16, 2021 by mrwill Link to comment
Solution creedon Posted November 17, 2021 Solution Share Posted November 17, 2021 Please see Form Block Post-submit Redirect URL Email Parameter Add. Let us know how it goes. tuanphan 1 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
mrwill Posted November 19, 2021 Author Share Posted November 19, 2021 It worked. Thank you! creedon 1 Link to comment
bryansinger Posted March 22, 2022 Share Posted March 22, 2022 On 11/17/2021 at 3:46 PM, creedon said: Please see Form Block Post-submit Redirect URL Email Parameter Add. Let us know how it goes. @creedon The redirect url changes the "@" to "%40" ...any idea how to make it clean. EXAMPLE: sergey@google.com becomes sergey%40google.com Redirect example:www.google.com/?email=sergey%40google.com With thanks in advance. Link to comment
creedon Posted March 22, 2022 Share Posted March 22, 2022 1 hour ago, bryansinger said: The redirect url changes the "@" to "%40" ...any idea how to make it clean. The URL is being properly encoded per URL specs. bryansinger 1 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
bryansinger Posted March 23, 2022 Share Posted March 23, 2022 17 hours ago, creedon said: The URL is being properly encoded per URL specs. Ah got it, thanks. Trying to redirect to Calendly auto-fill and they are after the "@" version, as opposed to "%40". If there's a workaround happy to donate / hire for consult. Cheers. Link to comment
creedon Posted March 23, 2022 Share Posted March 23, 2022 (edited) 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 April 18, 2022 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
wanderingjam Posted April 18, 2022 Share Posted April 18, 2022 (edited) Hi @creedon. I'm trying to get this working on my page: https://www.clncsports.com/secondslidefanstores for the email form...not seeing it pass through to my redirect page. Have added link to .js file and added code to specific page. Would love some help! Thanks! Edited April 18, 2022 by wanderingjam Link to comment
creedon Posted April 18, 2022 Share Posted April 18, 2022 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. wanderingjam 1 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
wanderingjam Posted April 19, 2022 Share Posted April 19, 2022 On 4/18/2022 at 2:22 PM, creedon said: 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. That fixed it! Thank you, sir! creedon 1 Link to comment
wanderingjam Posted April 19, 2022 Share Posted April 19, 2022 @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> Thanks! Link to comment
wanderingjam Posted April 19, 2022 Share Posted April 19, 2022 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> Thanks! Line 39 just needed to set label variable to my own value. Thanks for this! creedon 1 Link to comment
creedon Posted April 19, 2022 Share Posted April 19, 2022 Just now, wanderingjam said: Line 39 just needed to set label variable to my own value. Sounds like I should make that a user settable option in the next version of my code! 🙂 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
wanderingjam Posted November 29, 2022 Share Posted November 29, 2022 @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? Thanks! Link to comment
creedon Posted November 29, 2022 Share Posted November 29, 2022 3 hours ago, wanderingjam said: Trying to tweak your code to work for form fields other than email. I don't think tweaking is going to do it. The code was designed for its specific purpose without thought for generalization. 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
abhiQweebi Posted April 15 Share Posted April 15 (edited) Just try it now, but it doesn't seem to be working. I have installed the js file and added the code to the page header. Getting this error on page load: Refused to execute script from 'https://www.qweebi.com/s/twcsl.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. Edited April 15 by abhiQweebi Link to comment
creedon Posted April 15 Share Posted April 15 13 hours ago, abhiQweebi said: Just try it now, but it doesn't seem to be working. Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. You may find How to post a forum question post useful. 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
abhiQweebi Posted April 17 Share Posted April 17 On 4/16/2023 at 2:29 AM, creedon said: Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. You may find How to post a forum question post useful. https://www.qweebi.com/stemcon/book-a-meeting Check this page. This page redirects to calendly on submission. I was hoping to pre-fill the name and email fields on calendly. Link to comment
creedon Posted April 17 Share Posted April 17 (edited) 18 hours ago, abhiQweebi said: Check this page. twcsl is not installed properly. Please review steps 1 & 2 of the Paid Plan Install Steps for twcsl. Edited April 17 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
abhiQweebi Posted April 19 Share Posted April 19 On 4/18/2023 at 5:36 AM, creedon said: twcsl is not installed properly. Please review steps 1 & 2 of the Paid Plan Install Steps for twcsl. ohh yes! You were right. Quiet new to this so still figuring stuff out. Rediret works with the email now but having this encoding issue now: Trying to redirect to Calendly auto-fill and they are after the "@" version, as opposed to "%40". I tried setting the const encode = false but same result. Is it possible to add another field form the form to to the URL parameters? Really appreciate the help! Link to comment
creedon Posted April 22 Share Posted April 22 On 4/19/2023 at 5:06 AM, abhiQweebi said: Rediret works with the email now but having this encoding issue now: Trying to redirect to Calendly auto-fill and they are after the "@" version, as opposed to "%40". I tried setting the const encode = false but same result. You need to make two changes. const nth = "#block-11f0ac363ae2a6dc85ee"; // which form block from the page to use // false or true, set to false to not encode the email parameter const encode = true; The code should look like the following. const nth = 1; // which form block from the page to use // false or true, set to false to not encode the email parameter const encode = false; Quote Is it possible to add another field form the form to to the URL parameters? The code does not currently do this. I'll cogitate on how the code might be reworked to use multiple fields. Keep your eyes on this this thread. I can't make any promises that I can come up with something. If I do it would be at least several days, sometime into next week. 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment