Redirect to Next Typeform from Optional Query String Parameter | Community
Skip to main content
Answered

Redirect to Next Typeform from Optional Query String Parameter


Forum|alt.badge.img+2
  • Sharing wisdom
  • 15 replies

Hello,

I have a hidden field defined: next_typeform_id

I would like to have two endings to the current survey:

  1. if next_typeform_id is empty or missing, just load a default end screen
  2. if next_typeform_id exists, then redirect to that typeform (e.g., subdomain.typeform.com/to/next_typeform_id)

I can edit the logic on the final question of my Typeform survey to say:

if next_typeform_id:

  • is equal to
  • is not equal to
  • begins with
  • ends with
  • contains
  • does not contain

But there is not an option that I really want (“is defined” or “string length < 1” or something like that).

Am I missing something?

The only hack that I can think of is to have a 26-step logic that checks:

if next_typeform_id contains a OR

if next_typeform_id contains b OR

if next_typeform_id contains z

I am still very new to Typeform, so I am just hopeful that there is a better way.

Best answer by john.desborough

@TMo - you should be able to have logic along these lines: 

  • if next_typeform_id is not equal to (empty field)  then jumpto ending A - which has the redirect link on it 
  • in all other cases jumpto default ending B

and on the ‘redirect ending page’ your link would look something like this: (replace the hideme variable with your next_typeform_id

 

View original

6 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5351 replies
  • Answer
  • June 22, 2022

@TMo - you should be able to have logic along these lines: 

  • if next_typeform_id is not equal to (empty field)  then jumpto ending A - which has the redirect link on it 
  • in all other cases jumpto default ending B

and on the ‘redirect ending page’ your link would look something like this: (replace the hideme variable with your next_typeform_id

 


Gabi Amaral
Ex–Typefomer
Forum|alt.badge.img+5
  • Ex–Typefomer
  • 1776 replies
  • June 23, 2022

Let us know if you were able to follow John's suggestion and set up this logic, @TMo! I'm curious to check this form! 😉


Forum|alt.badge.img+2
  • Author
  • Sharing wisdom
  • 15 replies
  • June 23, 2022

It worked. Thanks!

It is somewhat annoying that my redirect also has utm parameters (e.g., utm_source, etc.) and if they are empty, it ends up redirecting with a bunch of underscores. I can do similar logic to check to see if the utm_source, etc. is not equal to empty string, but then that requires that I have a pretty messy redirect decision tree.


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5351 replies
  • June 23, 2022

@TMo - do you have UTM tracking for everything outside of Typeform? if you don’t need it in your typeforms, toggle the setting off and that should reduce the headache.. 

just a thought.. 

des


Forum|alt.badge.img+2
  • Author
  • Sharing wisdom
  • 15 replies
  • June 23, 2022

Not for everything, but for some things.


Gabi Amaral
Ex–Typefomer
Forum|alt.badge.img+5
  • Ex–Typefomer
  • 1776 replies
  • June 28, 2022

Make sure you share your survey when you're done with it, @TMo! We'd love to take a look at the final version and give you some feedback on it! 😉