Answered

Could we provide users with a custom URL based on survey fields?

  • 5 May 2023
  • 3 replies
  • 62 views

Userlevel 1
Badge

Our goal is to ask users 2 questions and present them with the URL of a relevant PDF.  One idea . . . would it be possible to ask a user questions, and use their responses to construct a URL for them?

Hypothetical situation: assume you have documents in folders with different URLs such as:

Then you asked the user two questions:

  • How would you like to travel, horse or car?
  • What would you like to drink while you travel, tea or coffee?

And then you dynamically took their responses to present to them the desired URL.  In my use case, we’d have about 900 possible URLs.

Is this an insane idea, or is there potential here?  Better ideas?  Thank you!!

 

 

icon

Best answer by Harsh 6 May 2023, 18:50

View original

3 replies

Userlevel 5
Badge +3

Hi Carolina,

 

You will need to use the ability of Typeform to use variables in the redirect link (Assuming that the user response will be in a different format than the PDF file URL.  If the format is the same you can skip using the “variables” and simply use the user response in the redirect URL in the endings directly).

 

You will need to setup a logical rule which essentially changes the variable values to the user’s selected value (in your case you would have to setup 2 variables i.e “travelPref” and “drinkPref”) .

After which you can simply setup the Redirect URL in the endings to something like the following

 

https://example.com/travelPref/drinkPref

 

where “travelPref” and “drinkPref” are the variables you setup earlier (Remember to replace example.com with your domain)

 

FYI Typeform will automatically replace the  variables  “travelPref” and “drinkPref”  with the user’s selected value.

 

eg the user chooses “horse” and “tea” as their response to the 2 questions on your form. They will then end up getting redirected to the following url (and as result able to access the relevant PDF) upon submission of the Typeform 

 

https://example.com/horse/tea

 

Hope this helps!

Userlevel 1
Badge

@harsh - thank you!  I appreciate your time, expertise, and examples.  I just made a successful version of my form today using variables.

Best regards,

CarolinaMark

Userlevel 1
Badge

One follow-up note . . . it actually is working to take people to the correct filename, not just the correct folder.  For example, while it could take a user to https://example.com/horse/tea, it can also take them to https://example.com/horse.tea.pdf

Hope that’s helpful for others - thanks,

CarolinaMark

Reply