Answered

Conditional hidden fields & displaying personalised results


I want to give my quiz takers their results + additional personalised information.

This could be either email it or displayed on my web. 

Essentially, I am trying to create something similar:

But as you can see, their results URL is messy. And fetching that info for more and longer answers with JS would be messy.

 

I looked at the hidden fields feature, but I would like to trigger a hidden field if a certain answer is selected — the goal of this is to keep the URL clean.

 

E.g. if someone chooses Option B in my question 5:

This is a very long answer for the question 5 and (and maybe even contains some $ymbols) yay.

 

So in this case it would create a really long URL string.

 

What I would like to do is create a hidden field. let's say

@shortanswer

 

and have it added to the URL in case the question is selected.

mypage.com/quiz-results/?name=Typeform&?Score=75&?shortanswer

 

Or have it stated as either true/false.

?shortanswer=true

 

Is this possible?

 

What are the best practices if I want to create a results page like that?

icon

Best answer by Mikkel 14 July 2022, 11:50

View original

4 replies

Userlevel 4
Badge +2

Hey @andrip! I recently posted a question that also deals with showing individual results to respondents. Perhaps the answers I received there might be useful for you?

 

 

Userlevel 7
Badge +5

Hi @andrip Did the suggestions from @Mikkel work for you? Let us know if you have any other questions!

Userlevel 7
Badge +5

Hey @andrip 

While @Mikkel ‘s solution might work, keep in mind you can also directly add pass answers to questions as query parameters in the redirect URL at the end of the typeform.

So it looks like https://myawesomewebsite.com?name={answer of question about name}

If you want to “sanitize” your data, you can also use variables.

Example: 
Where do you like to go on vacations?
- t
o the beach, tanning is super fun
- to the mountain, I need to see some green landscape
- stay at home, I don’t need to go anywhere

you can have a variable vacation_destination
and then assign a value to this variable using logic for each option, beachmountain, home

And then use the variable in the redirect URL
ex: https://myawesomewebsite.com?name={answer of question about name}&vacation={variable vacation_destination}

Using this solution you don’t need to code anything.

Hope this helps

Userlevel 7
Badge +5

Let us know if the solutions provided on this thread have helped you, @andrip! 😉

Reply