Skip to main content
Answered

Make a lower than on a hidden field

  • 8 November 2023
  • 5 replies
  • 41 views

Hi there,

 

Is there a way on the logic panel to make a condition “lower than” on a hidden field?

 

Thanks

@BorisPathtech - if you are passing in a hidden field to the form, it comes in as a text string and not a number. 

in ‘native typeform’ you would have to use a logic rule to check the value coming in and set up a numeric variable with the right number. then you would be able to use the lower than.. 

 

des


Hi, 

Thanks for your reply.

What do you mean by native typeform? 

I understood and created a variable as a number. But then I don’t see how I can pass the hidden fields as value for this number.

In the logic tab, I don’t see how I can get the value of my hidden fields and set it to the variable.


Hi @john.desborough 

I tried what you were saying but I don’t see how I can pass the hidden fields to the variable. Can you help on this?

 

Thanks a lot


 @BorisPathtech something like this: assuming the url passes in a weight like this: 

  • urlstring#h_wieght=20

so that h_weight is the hidden variable. the 20 is a text string not a number so it cannot be used in any numeric evaluation. 

if you had hidden variable logic rules that did something like this:

 

now here’s part of the url string when published: 

 

by replacing the xxxxx string with the value of 10 or 15, i should get the ‘lower than 12’ message in the form if i submit 10 and a default message that i set for v_message if the value was greater than 12

…../yr8TIhll#h_weight=xxxxx

here’s the link to the form with 10 

 

here’s the link to the form with 15 

 

means you have to put in the logic rules to turn the string into numeric variables if you want to use this feature. 

 

des


Ok thanks.

That means that if you can have 100 values of the hidden fields, you need to make 100 conditions?

Not sure that will work then.


Reply