Amin
March 15, 2024, 9:43am
#1
Unfortunately, it is currently not possible to trigger the fields within the nested items via a condition of a parent field. Could this be added?
fields:
type:
label: Type
type: dropdown
options:
1: Simple
2: Complex
content:
label: Content
type: nesteditems
form:
fields:
colors:
label: Colors
type: colorpicker
trigger:
action: show
field: ^type
condition: value[2]
This configuration is working :
fields:
type:
label: Type
type: dropdown
options:
1: Simple
2: Complex
content:
label: Content
type: nesteditems
form:
fields:
colors:
label: Colors
type: colorpicker
trigger:
action: show
field: ^type
condition: value[2]
You select “Complex” and you have the colorpicker showing the options.
What is your issue ?
Amin
March 15, 2024, 2:14pm
#3
yes, it works as a nestedForm but not as a nestedItems type.
The nesteditems field uses relation controller which renders a new form. Do you mean repeater?
Amin
March 20, 2024, 8:50am
#5
The following example should hopefully clarify what I meant.
fields:
type:
label: Type
type: dropdown
options:
1: Test1
2: Test2
nestedform:
label: nestedform
type: nestedform
form:
fields:
test1:
label: Test1
type: text
trigger:
action: show
field: ^type
condition: value[1]
test2:
label: Test2
type: text
trigger:
action: show
field: ^type
condition: value[2]
nesteditems:
label: nesteditems
type: nesteditems
form:
fields:
test1:
label: Test1
type: text
trigger:
action: show
field: ^type
condition: value[1]
test2:
label: Test2
type: text
trigger:
action: show
field: ^type
condition: value[2]
The fields within the nestedform can be triggered.
The fields within the nesteditems cannot be triggered.
If this is not possible…is there another way to achieve this?
Thx
I see.
Unfortunately, this is not possible since the nested items are contained in a different form. Consider using a content group (groups ) definition, which has a similar effect.