Repository navigation
|
I would like to show certain fields only if I select a relation that has a certain value within that relation. In the example below I only want to show the "Art" field (which is an entries field) if the category field (Kategorie) has the lightswitch "Art (switch)" selected. So I am missing a dropdown with something like "Field contains value x" where I can select a field from within that category field. I hope this makes sense and would be really powerful in my opinion. Condition for the "Art" Field:In this screenshot there should be a dropdown with "contains value" and then another field where I can select the "Art (Switch)": Here you see the categories with the different switches on / off. E.g. if you select "Trauringe" in Kategorie the "Art" field would disappear and if you select "nach Kundenwunsch" the "Price" field would disappear because in that context they don't make any sense. This could make some serious fine grained backend experiences! |
Replies: 2 comments 9 replies
|
If you expand the operator dropdown, there should be an “is related to” option, which allows you to enter a related element ID, or the name of an environment variable that is set to an ID. An environment variable is recommended, because your element IDs are likely to be different depending on the environment. |
|
@outline4 I think a workaround for this should be possible using the preparse field when it becomes available for Craft 4 (very soon, according to its author), and if it is available for use in conditions. |



@outline4 I think a workaround for this should be possible using the preparse field when it becomes available for Craft 4 (very soon, according to its author), and if it is available for use in conditions.