Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3789 - Update the form IO conditions based on form data #3964

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions sources/packages/forms/src/form-definitions/sfaa2022-23.json
Original file line number Diff line number Diff line change
Expand Up @@ -1742,15 +1742,16 @@
"threshold": 0.3
},
"id": "eopfm7h",
"defaultValue": ""
"defaultValue": "",
"isNew": false
},
{
"label": "Select your program of study:",
"disabled": true,
"tableView": true,
"persistent": false,
"key": "selectedProgramName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedProgramName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -1821,7 +1822,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "easelit",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your program is not listed",
Expand Down Expand Up @@ -2147,7 +2150,14 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "ejhdok9",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the data.myProgramNotListed.programnotListed be converted to bool as

show = data.myProgramNotListed ? !!data.myProgramNotListed.programnotListed : false;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data.myProgramNotListed.programnotListed is a boolean itself. Still do we require a conversion?

"lockKey": true
},
{
"label": "Program description",
Expand Down Expand Up @@ -2227,7 +2237,13 @@
"editor": "",
"fixedSize": true,
"id": "efzyprr",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;"
},
{
"label": "HTML",
Expand Down Expand Up @@ -2489,7 +2505,8 @@
"addons": [],
"inputType": "text",
"id": "ehmio79",
"defaultValue": ""
"defaultValue": "",
"isNew": false
}
],
"width": 6,
Expand Down Expand Up @@ -3483,7 +3500,8 @@
"lazyLoad": false,
"theme": "default",
"breadcrumb": "default",
"id": "eezaqos"
"id": "eezaqos",
"tags": []
},
{
"label": "Select your study dates",
Expand Down Expand Up @@ -3599,7 +3617,7 @@
"tableView": true,
"persistent": false,
"key": "selectedOfferingName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedOfferingName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -3670,7 +3688,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "e9w4l3n",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your study dates are not listed",
Expand Down
38 changes: 29 additions & 9 deletions sources/packages/forms/src/form-definitions/sfaa2023-24.json
Original file line number Diff line number Diff line change
Expand Up @@ -1742,15 +1742,16 @@
"threshold": 0.3
},
"id": "eopfm7h",
"defaultValue": ""
"defaultValue": "",
"isNew": false
},
{
"label": "Select your program of study:",
"disabled": true,
"tableView": true,
"persistent": false,
"key": "selectedProgramName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedProgramName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -1821,7 +1822,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "easelit",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your program is not listed",
Expand Down Expand Up @@ -2147,7 +2150,14 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "ejhdok9",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;",
"lockKey": true
},
{
"label": "Program description",
Expand Down Expand Up @@ -2227,7 +2237,13 @@
"editor": "",
"fixedSize": true,
"id": "efzyprr",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;"
},
{
"label": "HTML",
Expand Down Expand Up @@ -2489,7 +2505,8 @@
"addons": [],
"inputType": "text",
"id": "ehmio79",
"defaultValue": ""
"defaultValue": "",
"isNew": false
}
],
"width": 6,
Expand Down Expand Up @@ -3483,7 +3500,8 @@
"lazyLoad": false,
"theme": "default",
"breadcrumb": "default",
"id": "eezaqos"
"id": "eezaqos",
"tags": []
},
{
"label": "Select your study dates",
Expand Down Expand Up @@ -3599,7 +3617,7 @@
"tableView": true,
"persistent": false,
"key": "selectedOfferingName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedOfferingName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -3670,7 +3688,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "e9w4l3n",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your study dates are not listed",
Expand Down
38 changes: 29 additions & 9 deletions sources/packages/forms/src/form-definitions/sfaa2024-25.json
Original file line number Diff line number Diff line change
Expand Up @@ -1742,15 +1742,16 @@
"threshold": 0.3
},
"id": "eopfm7h",
"defaultValue": ""
"defaultValue": "",
"isNew": false
},
{
"label": "Select your program of study:",
"disabled": true,
"tableView": true,
"persistent": false,
"key": "selectedProgramName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedProgramName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -1821,7 +1822,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "easelit",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your program is not listed",
Expand Down Expand Up @@ -2147,7 +2150,14 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "ejhdok9",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;",
"lockKey": true
},
{
"label": "Program description",
Expand Down Expand Up @@ -2227,7 +2237,13 @@
"editor": "",
"fixedSize": true,
"id": "efzyprr",
"tags": []
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"customConditional": "show = data.myProgramNotListed ? data.myProgramNotListed.programnotListed : false;"
},
{
"label": "HTML",
Expand Down Expand Up @@ -2489,7 +2505,8 @@
"addons": [],
"inputType": "text",
"id": "ehmio79",
"defaultValue": ""
"defaultValue": "",
"isNew": false
}
],
"width": 6,
Expand Down Expand Up @@ -3483,7 +3500,8 @@
"lazyLoad": false,
"theme": "default",
"breadcrumb": "default",
"id": "eezaqos"
"id": "eezaqos",
"tags": []
},
{
"label": "Select your study dates",
Expand Down Expand Up @@ -3599,7 +3617,7 @@
"tableView": true,
"persistent": false,
"key": "selectedOfferingName",
"customConditional": "show = !!data.isReadOnly",
"customConditional": "show = (!!data.isReadOnly && !!data.selectedOfferingName);",
"type": "textfield",
"input": true,
"placeholder": "",
Expand Down Expand Up @@ -3670,7 +3688,9 @@
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "e9w4l3n",
"tags": []
"tags": [],
"lockKey": true,
"isNew": false
},
{
"label": "Your study dates are not listed",
Expand Down