Copy link to clipboard
Copied
Hello community!
I have a question regarding JavaScript for dropodown selections. I have a dropdown that has mulitple medical providers in it and when one of those providers is selected it populates text fields related to address information (street, state, zip etc...) i also have 12 checkboxes that will have various selections made depending on the dropdown selection. My question is Im having trouble figuring out the syntax to allow the user to make checkbox selection modifications AFTER the "hardcoded" selections are made based on the dropdown selection. That is, for example, if checkboxTwelve is selected when a dropodown choice is made I need the user to at their discretion be able to deselect that box and/or make other selections/deselections as needed. So prepopulation upon selection of a dropdown choice but complete ability to be able to select/deselect other options at will. Does someone have an example of this functionality that they could share? If any clarification is needed please feel free to post questions and thank you as always!!!!
Copy link to clipboard
Copied
From your text I assume you already have that script placed probably as custom calculation script, to be able to deselect checkboxes you need to use script as validation of dropdown field not calculation.
Copy link to clipboard
Copied
I just wanted to add some information to Nesa's solution. The reason Nesa's solution works and yours did not is because calculations run every time any field value in the form changes. Field values will always revert to the calculated value. Validation scripts run only when the value of the field containing the validation script runs, so the user is able to change field values after the validation script runs.
Copy link to clipboard
Copied
From your text I assume you already have that script placed probably as custom calculation script, to be able to deselect checkboxes you need to use script as validation of dropdown field not calculation.
Copy link to clipboard
Copied
I just wanted to add some information to Nesa's solution. The reason Nesa's solution works and yours did not is because calculations run every time any field value in the form changes. Field values will always revert to the calculated value. Validation scripts run only when the value of the field containing the validation script runs, so the user is able to change field values after the validation script runs.

