I have about a dozen string fields that contain objects and their states (for example, let’s take ‘AC_on’ and ‘heater_off’). And I have a view that shows nodes containing those fields. The task I’m trying to achieve is this. A user should have two sets of options to filter the nodes by the aforementioned fields:
- To pick one of the objects via radio button (AC or heater);
- To pick the states in which the previously picked option should be in the filtered set of nodes (only "on", or only "off", or "on" an "off" – so obviously check boxes).
It’s no big deal to create the desired filters cosmetically: we can use combined fields filter for the set of radio buttons (search through all object fields and if the user picks "AC", filter out all "AC_null" values), and once again – for check boxes (for "On" include those values that contain "on" etc). The problem is, this approach doesn’t work 🙂 The second set doesn’t care which object with"off" state it filters out.
So, I figured I could somehow pass whatever the user picked in the radio part (AC) into the values of the checkbox filter (so it wouldn’t just search for "on", but for "AC_on"). The problem is, for the life of me I can’t find a module that would allow me to do that.
"Views Dependent filters" seems like just the tool for the job, but unfortunately, it’s for D7, and I have D9. Is there any way to achieve this? Any help would be highly appreciated.
PS I can’t code, apart from the simplest PHP one-liners and CSS, so no-code solution is preferable.