Feedback
Question

How to add Logic jump between questions based on hidden fields?

  • 13 October 2021
  • 9 replies
  • 53 views

Hi,

I have created a form and I’m now trying to add logic jumps on some questions based on hidden fields.
For example, If I’m having 5 questions on my form let’s say A,B,C,D,E and five hidden fields hidden_a, hidden_b, …hidden_e respectively.

I’m trying to add a logic such that if hidden field hidden_a contains some value so skip Ques. A and jump to Ques.B, similarly if there is some value for hidden_c then starting with Ques.A then go to Ques.B and then to Ques.D by skipping Ques.C.

Hope I’m able to explain my expectations. Any help is much appreciated.

Thanks!


9 replies

Userlevel 7
Badge +5

Hi @puneetsharma Great question! :) This is possible using logic jumps. You’d set this up like this on your form so that the first question shows based on data in the hidden fields. 

If you’d like to skip further questions, then on the previous question, you’ll add a jump like this. 

I hope this helps! This article here can help with ordering logic jumps. Let me know if you have any trouble setting this up. 

Hey @Liz 
Thanks for your help!
Let me show you how I am trying to make it.
 

These 5 questions I have created and added a initial jump to question 3 if hidden fields for 1 and 2 are not empty else it will jump to 1
​​​​​

 

Logic for 1st Jump

Now I am trying to skip ques3 Gender if hidden field value for gender is not null, like in the attachment below. Here I’m stucked, this may an incorrect logic.
What will be the correct logic to jump question 3 if its hidden value is not null and I want to do same for further some more question.

 

Userlevel 7
Badge +5

Hi @puneetsharma Thank you for the screenshots! You could set it to check if it’s not equal to “xxx” (with the same number of default x’s), which would be the default if no hidden fields are added. 

Hi @Liz 
Sorry but I can’t get your point. What are the x’s here? and for which question (from the shared screenshots) should I check if it’s not equal to “xxx”?

Userlevel 7
Badge +5

Ah, apologies, @puneetsharma ! For any logic jump that you’re leaving blank (so checking for no value), you should replace that with the x’s. 

I have replaced blank values with xxx, It is jumping to question 3 but still can’t able to make a jump on question 4 if there is a value set for hidden field cus_gender_hidden.

P.S: I have assigned a value = Male to hidden field cus_gender_hidden using data-tf-hidden attribute on form embed.

Userlevel 7
Badge +6

@puneetsharma - you may have constrained your logic by having an “always jumpto” statement  defined in your question - regardless of what your variable evaluation might be, it would appear that the always statement would take preference. 

 

just my tuppence 

 

des

Hey @john.desborough 

So, according to the statement “the always statement would take preference”.
It should jump to question 4 as the always statement having preference. Isn’t?

Userlevel 7
Badge +6

my point was related to something like this question from your example: if the logic example is TRUE then jump to q3.. if it is not true, then jump to 3..

 

in both cases you are directing them to q3.. where should they be going if the logic statement is evaluated as false??

Reply