-
Notifications
You must be signed in to change notification settings - Fork 14
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
#3984 - Former youth in care question update #4333
Conversation
{ | ||
"name": "Update Youth In Care Options", | ||
"type": "customAction", | ||
"customAction": "var options = [\n { label: 'Yes', value: 'yes' },\n { label: 'No', value: 'no' }\n];\n\nif (data.howWillYouBeAttendingTheProgram === 'Part Time') {\n options.push({ label: 'Prefer not to answer', value: 'preferNotToAnswer' });\n}\n\ncomponent.values = options;" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a benefit of using var over const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the reassignment of the options variable when assigned back to component.values will not happen if its const.
Good job @guru-aot. Please take a look at the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks for making the changes.
|
"show": "", | ||
"when": null, | ||
"eq": "", | ||
"json": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. Please create a ticket to fix the same in other PY forms.
"customMessage": "", | ||
"custom": "", | ||
"onlyAvailableItems": false, | ||
"customMessage": "Youth In Care is an invalid value.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust the message. E.g. Invalid value for Youth In Care.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes. Looks good. Just a minor comment. #4333 (comment)
Former youth in care question updated in application for Program Year 2025-2026 - Prefer not to answer option is updated to display only for full time
Full Time


Part Time


Code snippet in the Logic for dynamic loading of options
load the json in https://formio.github.io/formio.js/app/sandbox.html to view the logic