Is there a way on the logic panel to make a condition “lower than” on a hidden field?
Best answer by john.desborough 8 November 2023, 15:47
@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..
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.
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:
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
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.
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.
Don't be shy and ask the community.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.