Conditionnal check box

Explorer ,
Sep 23, 2020 Sep 23, 2020

Copy link to clipboard

Copied

I'm new to JS. I know it should be easy to do that but I didn't find my answer anywhere.

I have a check box that I want to be checked only if there is a value in either one of my three drop-down list. 

Every script I tried didn't work out. 

How should I write it ?

 

If Drop1 or Drop 2 or Drop 3 is not empty, check Box 1

Thanks again, 

TOPICS
Acrobat SDK and JavaScript

Views

270

Likes

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

Adobe Community Professional , Sep 23, 2020 Sep 23, 2020
Hi, sorry guys for meddling, if I got it right you want to check checkbox if values are not empty in one of 3 dropdown fields and to be unchecked if no items are selected in dropdowns? If thats all you want, add empty value to each dropdown and give it export value of 0, then you can use this code as custom calculation script of one of dropdown fields or another hidden text field:if(this.getField("Decoupe").value != 0){ this.getField("Dessin").checkThisBox(0, true);} else if(this.getField("Assem...

Likes

Translate

Translate
Explorer ,
Sep 24, 2020 Sep 24, 2020

Copy link to clipboard

Copied

Thanks ! It works and this method is simple for me as I am new to JS.

Likes

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