You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm updating a form, trying to get conditional dependencies working, within sub arrays/containers. Is this possible in Alpaca?
Any advice would be much appreciated.
I'm updating a form, trying to get conditional dependencies working, within sub arrays/containers. Is this possible in Alpaca?
Any advice would be much appreciated.
Here's a JSFiddle and below is my example code.
I only want the Hospital (other) to show if the option hospital/320789 is chosen.
$(".field").alpaca({ "schema": { "type": "object", "title": "Test Form with conditionals in containers", "required": [], "properties": { "~0": { "type": "object", "properties": { "~1": { "type": "object", "properties": { "hfrsHDC": { "id": "conditionalTest", "type": "string", "title": "Please select an option", "options": [{ "value": 320789, "id": "hospital" }, { "value": 320790, "id": "community" } ], "enum": [ "320789", "320790" ] } } }, "~8": { "type": "object", "title": "Hospital details", "required": [], "properties": { "hospitalOther": { "type": "string", "title": "Hospital (Other)" }, } } } } } }, "options": { "fields": { "~0": { "fields": { "~8": { "fields": { "hospitalOther": { "dependencies": { //"#conditionalTest": [320789] "~0_~1_hfrsHDC": [320789] } }, //"dependencies": { // "#conditionalTest": "320789" // } } } } } }, } });
The text was updated successfully, but these errors were encountered: