• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Checkbox selected/deselected based on Dropdown selection

New Here ,
Jul 03, 2024 Jul 03, 2024

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

TOPICS
JavaScript , Modern Acrobat , PDF

Views

82

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 03, 2024 Jul 03, 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.

Votes

Translate

Translate
Community Expert ,
Jul 03, 2024 Jul 03, 2024

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 03, 2024 Jul 03, 2024

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines