Can I use hidden fields to include a unique sentence/description in one of my questions for every respondent? | Community
Skip to main content
Question

Can I use hidden fields to include a unique sentence/description in one of my questions for every respondent?


Forum|alt.badge.img

I have a Google sheet with 10K+ unique sentences. I would like to update one of my questions with a unique sentence for every respondent. Is this possible? And what tools do you recommend? 

The unique sentence is not tied to a specific person, so I just need to be able to update the question for every person who fills in the form. 

Seems like the best way would be to link my Google sheet, and update the question with the unique sentence using hidden fields but I'm not able to make it work. 

 

Any help is highly appreciated! 

 

Best, 

 

Jakob

17 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14883 replies
  • April 25, 2023

@mathio do you happen to know any fun code workarounds for this? I can’t think of a super easy way to connect this to a Google Sheet offhand. 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 25, 2023

Hi Liz, 

 

Thanks for your reply. I could also import all the words/sentences to another tool if that would be easier. But the problem with CRM tools is that all of them want me to add contact information rather than one word/sentence.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14883 replies
  • April 25, 2023

Hi @Jakob Dubois It might be worth looking at a CRM or email service provider, as it would definitely make sending the emails and passing information in easier! For example, with services like Mailchimp, I believe you could create your own field, though it would require adding in the contact information so the system knows where to email the form. 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5264 replies
  • April 25, 2023

@Jakob Dubois - if you use a CRM or ESP as @Liz describes, you can use a tool like Make or Zapier to create a routine to grab one of your 10k statements and put it into a custom field in the client record, then as long as you have the email address you can push out the ‘string’ as a hidden variable into the typeform and then recall it. 

 

you COULD get folks to complete a short registration typeform that collects name and email and connect your form to the google sheet. (either the existing one or a new one) and then use tools like Document Studio (an add-on for google sheets) to create the custom email to send out to the recipient with the link to the typeform with the string attached as a hidden field.

to get the string, you have the typeform data being pushed into a ‘target tab’. create a new tab to hold both the data from the typeform record AND a field for a random number between 1 and your max row count ie 10k. using that random number, do a v_lookup onto the long list tab/form and pull back the string associated with that row number. then you have all the details that Document Studio would need to create the email with the link in it and send out to the client to take them to the next form. 

 

just a thought

 

des


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 25, 2023

@john.desborough, thank you so much for your answer. I highly appreciate your help! This sounds great but I do not want to send the Typeform to folks via email. 

Currently, users come to my website, press a button and then the Typeform is launched. I would like to keep it this way. So my question is basically if it’s possible to change the statement in one question for every respondent when they fill in my form, without having their email addresses? Would this work by using document studio? Thank you so much for your help. 

It doesn't matter what kind of statement my responders receive, it can be random but no one can receive the same one. 

 

Please let me know if I need to elaborate!

 

 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 26, 2023

@john.desborough , do you think this is possible? Please let me know if I need to clarify anything. 

 

Best, 

 

Jakob  


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • April 26, 2023

Hello @Jakob Dubois 

If I understand correctly, you can pass the value to typeform via a hidden field and then recall the field in your question where you want to display it.

You will need to manage storying the value and pairing it to correct user on your side. Is this value supposed to be random for each user? Or how do you identify which user should see which value?


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 26, 2023

@mathio Thank you for your help. The value is not tied to a specific user, meaning who receives which value doesn’t matter; therefore, it’s random for each user. But no user must receive the same value. This should work, right? 

 

Best, 

 

Jakob 

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5264 replies
  • April 26, 2023

@mathio - if you are embedding this into your website and want to pull something form a google sheet and then add it to the url to send into the form as a hidden field, you would have to implement the code outside of the typeform domain so that WHEN the user pushes the button, the query goes to the google sheet, selects an item at random and then appends it to the url that is then used to call the typeform 

typeform cannot restrict the user getting duplicate info from your google sheet as your code would need to comtrol this. you could set a flag field in google sheets that when a row is used in the url, you would set the ‘used’ flag so that your query code would only select from rows where used_flag is no. 

des


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 26, 2023

@john.desborough Thank you so much, John. To clarify, the Typeform is not embedded into my website; a user presses the button, and the Typeform is launched in a new window(the user gets automatically redirected). So this makes it easier, right? 

 

Best, 

 

Jakob 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5264 replies
  • April 26, 2023

regardless of embedded or not, @Jakob Dubois , the code/action required is on your side BEFORE it gets passed into typeform. you need to trigger the query into google sheets and get the string, append it to the url and pass it into the typeform. 

how you execute that is up to the tools at your end of the process flow. 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 26, 2023

Thank you, John! 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 26, 2023

@john.desborough If you would do this yourself, how would you choose to execute and what tools would you use? (disregard that I currently have the statements in Google sheet)

 

Best, 

 

 


 


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • April 27, 2023

Your use-case is quite interesting, so I tried to implement it. I used SheetDB to access data from the spreadsheet. I am using Embed SDK to mark the question as answered when the typeform is submitted.

You can see the demo here:
https://mathio.github.io/typeform-embed/html/random-question-from-google-sheet.html

And source code here:
https://github.com/mathio/typeform-embed/blob/main/html/random-question-from-google-sheet.html

@Jakob Dubois what do you think about my solution?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5264 replies
  • April 27, 2023

@mathio - even I like this one! well done.. 

 

des


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • April 27, 2023

@mathio, thank you so much - super kind of you. I will try this and let you know if I encounter any problems! 

 

Many thanks and all the best, 

Jakob 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14883 replies
  • April 27, 2023

Let us know how it goes, @Jakob Dubois !


Reply