Need to display dependee if field has a value "less than" or "greater than" specified value.

Comments

nhytros’s picture

Priority: Major » Normal
dtrdewaele’s picture

Any update on this?

ressa’s picture

Assigned: nhytros » Unassigned

I am also looking to check if the value of a field is within a certain range:

I would like to show a field if the value of another field is for example below 3 or above 8. So if the user enters for example "2.4" or "9.2", the hidden field is shown. Nothing should happen if "4.3" is entered, because it's within the range of 3 to 8. Is this possible?

Also, is it possible to use tokens, like values from other fields?

firfin’s picture

This is possible in webform 4. You need to use a component of the number type to do the checking on though.

To create a 'only show if greater than x or less then y' just create multiple conditions.

firfin’s picture

Issue summary: View changes
Status: Active » Closed (fixed)
8bitplateau’s picture

Component: User interface » Code
Status: Closed (fixed) » Active

Moving back to active from fixed. This module does not have this functionality therefore feature request is still active.

firfin’s picture

Not gonna happen for the webform 3 version though I think.
Anybody looking to do this, check out webform 4

r2coder’s picture

I'm using the conditional field module and tried to solve this with a regex value.
Use case: If the number of attendees is greater than 30, show someField.
Regex: ^([3-9]\d|[1-9]\d{2,})$
kludgy & primitive but its working.
If anyone can provide an example of how to use a token or basic logic: [value] >= x - it would be appreciated.
/r