Skip to main content
samanthaharris925
Participant
Apr 22, 2019 7:07 PM UTC
Answered

Help setting check boxes in Acrobat Pro DC

Hello, I am working on a form where once one checkbox is clicked, I need it to automatically check another box. My issue is I need the checkbox that would automatically be checked to have the capability to be unchecked without unchecking the first checkbox. Is this do-able?

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Apr 22, 2019 7:18 PM UTC

Well, step one is to give the second field a unique name. Let's say the first one is called CB1 and the second CB2.

Add this code as the Mouse Up event of CB1:

if (event.target.value!="Off") this.getField("CB2").checkThisBox(0, true);

6 replies

try67
Community Expert
Community Expert
Apr 22, 2019 7:09 PM UTC

Should the second check-box be un-checked when the first one is?

Translate
samanthaharris925
Participant
Apr 22, 2019 7:15 PM UTC

Yes. It should only be checked when the first one is. The first checkbox is the general product, and there are 6 checkboxes underneath as options. We want one option to be automatically checked once the first box to checked, but have the capability to choose another checkbox if the customer wants a different option. Currently, if I try to uncheck the second checkbox, it unchecks the first one, which I don't want to do.

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Apr 22, 2019 7:18 PM UTC

Well, step one is to give the second field a unique name. Let's say the first one is called CB1 and the second CB2.

Add this code as the Mouse Up event of CB1:

if (event.target.value!="Off") this.getField("CB2").checkThisBox(0, true);

Translate