List fields with select dropdown: match condition against "value" (not against text)

Created on 17 July 2017, about 8 years ago
Updated 23 November 2019, almost 6 years ago

Hi.

I added a List field to a content-type (widget: Select List) named "Type of item". This field is rendered as:

<select>
<option value="current">Current blah"</option>
<option value="past">Past blah"</option>
</select>

In the other hand, I have a view with some fields that have to be hidden based on the value of "Type of item". For all those fields, I've created a "Views: conditional field" field with:

If "field_type_of_item" contains "Current" then display "XYZ" else display "".

(+ No results behaviour => [X] hide field if empty)

But the "contains" (or Is) comparison is done against the TEXT of the option, not against the "value" of the option. This means that I can't translate the strings "Current blah" and "Past blah" because then the field would not match.

Is there any way to make Views Conditional match against "current" and "past" (the values)?

Thanks.

✨ Feature request
Status

Active

Version

1.3

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain Overflowed

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024