Skip to content

Instantly share code, notes, and snippets.

@aviriel
Last active May 9, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviriel/e070d0ac7768328bfa524e52ad7858b1 to your computer and use it in GitHub Desktop.
Save aviriel/e070d0ac7768328bfa524e52ad7858b1 to your computer and use it in GitHub Desktop.
{
"name": "alfresco/forms/DynamicForm",
"config": {
....
"widgets": [{
"name": "alfresco/forms/controls/Select",
"config": {
"name": "A",
"label": "A",
"fieldId": "PRESET_A",
"value": "1",
"optionsConfig": {
"fixed": [{
"label": "1",
"value": "1"
}, {
"label": "2",
"value": "2"
}]
}
}
}, {
"name": "alfresco/forms/controls/Select",
"config": {
"name": "B",
"label": "B",
"fieldId": "PRESET_B",
"value": "1",
"optionsConfig": {
"fixed": [{
"label": "1",
"value": "1"
}, {
"label": "2",
"value": "2"
}]
}
}
}, {
"name": "alfresco/forms/controls/TextBox",
"config": {
"name": "hidden",
"fieldId": "PRESET",
"value": "11",
"autoSetConfig": [
{
"rulePassValue": "11",
"rulesMethod": "ALL",
"rules": [{
"targetId": "PRESET_A",
"is": ["1"]
}, {
"targetId": "PRESET_B",
"is": ["1"]
}]
}, {
"rulePassValue": "12",
"rulesMethod": "ALL",
"rules": [{
"targetId": "PRESET_A",
"is": ["1"]
}, {
"targetId": "PRESET_B",
"is": ["2"]
}]
}, {
"rulePassValue": "21",
"rulesMethod": "ALL",
"rules": [{
"targetId": "PRESET_A",
"is": ["2"]
}, {
"targetId": "PRESET_B",
"is": ["1"]
}]
}, {
"rulePassValue": "22",
"rulesMethod": "ALL",
"rules": [{
"targetId": "PRESET_A",
"is": ["2"]
}, {
"targetId": "PRESET_B",
"is": ["2"]
}]
}
]
}
}, {
"name": "alfresco/html/Label",
"config": {
"label": "Label",
"visibilityConfig": {
"initialValue": true,
"rulesMethod": "ALL",
"rules": [{
"topic": "_valueChangeOf_PRESET",
"attribute": "value",
"is": [ "11" ],
"strict": true
}]
}
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment