How can I attach an email capture to a typeform? | Community
Skip to main content
Answered

How can I attach an email capture to a typeform?


Thehustle.co captures an email and then you click ‘Join Free’ goes to typeform - how can we recreate this?

Best answer by mathio-tf

You can pass the email you captured outside of the typeform via hiden field when you set it up for your form.

Then you can embed the typeform and populate the hidden field dynamically with the value from you other form. With the latest embed lib the code will look like this:

<div data-tf-widget="<form-id>" data-tf-hidden="email=<value>"></div>
<script src="//embed.typeform.com/next/embed.js"></script>

Alternatively you could read the param from your page URL. Fore example if you redirect users to a page like /signup.html?email=user@example.com you can use this snippet to pass the email to your form:

<div data-tf-widget="<form-id>" data-tf-transitive-search-params="email"></div>
<script src="//embed.typeform.com/next/embed.js"></script>

 

View original

3 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5279 replies
  • April 23, 2021

@revgenius - can you show a screenshot of what you are trying to accomplish? and perhaps describe in a little more detail the flow of information you want to achieve. 

that will help this user and the Typeform folks who support the community to better answer your question

 


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • April 23, 2021

You can pass the email you captured outside of the typeform via hiden field when you set it up for your form.

Then you can embed the typeform and populate the hidden field dynamically with the value from you other form. With the latest embed lib the code will look like this:

<div data-tf-widget="<form-id>" data-tf-hidden="email=<value>"></div>
<script src="//embed.typeform.com/next/embed.js"></script>

Alternatively you could read the param from your page URL. Fore example if you redirect users to a page like /signup.html?email=user@example.com you can use this snippet to pass the email to your form:

<div data-tf-widget="<form-id>" data-tf-transitive-search-params="email"></div>
<script src="//embed.typeform.com/next/embed.js"></script>

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5279 replies
  • April 23, 2021

@revgenius - you might also want to examine this thread here in the community: 

des


Reply