Pass info from page to form | Community
Skip to main content
Answered

Pass info from page to form


I’m using typeform for a post purchase survey on a bigcommerce shop and want to be able to identity who had completed the form without having to ask (as they have just checked out and we already have this info). It’s available as a variable on the page where typeform is embedded but is there a way to pass it to typeform?

Best answer by picsoung

Hey @BobBob 

Not familiar either with BigCommerce, but when you say it’s available as a variable in the page, is it through the templating system from BigCommerce? I believe they call it Stencil and use Handlebars for it.

if thats the case you can probably pass the value from those varibales.
changing the URL of your form with the hidden fields 
like https://forms.typeform.com/to/formId?username={{user.name}}&orderId={{order.id}}

If it’s in the webpage URL where the user is redirected after their purchase, you can use another method, to extract values from the parent window and passed them to the embedded form.
As described in this topic

 

View original

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14840 replies
  • April 12, 2021

Hi @BobBob thanks for stopping by the community! I’m afraid I’m not terribly familiar with BigCommerce, but do know if you happen to have parameters you can pass from the order form? If you don’t mind giving some more context on your current setup and available options within BigCommerce, this will help me see if this is possible. :grinning:


picsoung
Typeform
Forum|alt.badge.img+5
  • Developer Advocate @ Typeform
  • 384 replies
  • Answer
  • April 14, 2021

Hey @BobBob 

Not familiar either with BigCommerce, but when you say it’s available as a variable in the page, is it through the templating system from BigCommerce? I believe they call it Stencil and use Handlebars for it.

if thats the case you can probably pass the value from those varibales.
changing the URL of your form with the hidden fields 
like https://forms.typeform.com/to/formId?username={{user.name}}&orderId={{order.id}}

If it’s in the webpage URL where the user is redirected after their purchase, you can use another method, to extract values from the parent window and passed them to the embedded form.
As described in this topic

 


  • Author
  • Explorer
  • 1 reply
  • April 14, 2021

Yes that’s it, I’m guessing that wouldn’t work with an embedded form?

I’ll have a look at making it off site and see how that effects the survey being completed


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14840 replies
  • April 15, 2021

Hi @BobBob the instructions in the link above will walk you through how to pass the data through an embedded form. :grinning: Let us know if you run into any troubles setting it up!


Reply