Skip to main content
Participant
July 3, 2024
Answered

Checkbox selected/deselected based on Dropdown selection

  • July 3, 2024
  • 2 replies
  • 902 views

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!!!!

This topic has been closed for replies.
Correct answer PDF Automation Station

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.

2 replies

PDF Automation Station
Community Expert
Community Expert
July 3, 2024

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.

Nesa Nurani
Community Expert
Community Expert
July 3, 2024

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.