Redirect to Next Typeform from Optional Query String Parameter

Userlevel 2


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.,

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 22 June 2022, 22:53

View original

5 replies

Userlevel 7
Badge +6

@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


Userlevel 7
Badge +5

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! 😉

Userlevel 2

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.

Userlevel 7
Badge +6

@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.. 


Userlevel 2

Not for everything, but for some things.