Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Need to display dependee if field has a value "less than" or "greater than" specified value.
Comments
Comment #1
nhytros CreditAttribution: nhytros commentedComment #2
dtrdewaele CreditAttribution: dtrdewaele commentedAny update on this?
Comment #3
ressa CreditAttribution: ressa commentedI 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?
Comment #4
firfin CreditAttribution: firfin commentedThis 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.
Comment #5
firfin CreditAttribution: firfin commentedComment #6
8bitplateau CreditAttribution: 8bitplateau commentedMoving back to active from fixed. This module does not have this functionality therefore feature request is still active.
Comment #7
firfin CreditAttribution: firfin commentedNot gonna happen for the webform 3 version though I think.
Anybody looking to do this, check out webform 4
Comment #8
r2coder CreditAttribution: r2coder commentedI'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