Answered

Dynamically transfering Wordpress current_user_id to typeform

  • 5 October 2022
  • 6 replies
  • 75 views

Badge

Is there a way in which I can dynamically transfer the Wordpress current_user_id to my embedded typeform ? 

icon

Best answer by mathio 11 October 2022, 09:37

View original

6 replies

Userlevel 7
Badge +5

Hi @Michel van de Beek Happy Wednesday! The only way to pass information into the form is through hidden fields. Do you have the form embedded on your website? Or how are your respondents are going from your website to the form? 

Badge

Hi @Liz the form is embedded on the website. We want to pass the WP current_user_id to the typeform through a hidden field. How do you achieve this?  

Userlevel 7
Badge +5

Ok, thanks, @Michel van de Beek ! This article here can walk you through passing information through hidden fields on an embedded form. 😀

Badge

@Liz In the article I don’t see how you can use/transfer dynamical variables. 

Could you help me out with some example code how to do this?

Userlevel 7
Badge +5

Hi @Michel van de Beek This will depend on how you’re grabbing the information from Wordpress. 

@mathio might have some insight on this!

Userlevel 7
Badge +5

You can pass dynamic variables via JS API if you have the value available client-side. If the value is available server-side you ca just print it into the embed code with eg. PHP.

Reply