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

Adobe Form Checkbox Condition Question

New Here ,
Nov 23, 2024 Nov 23, 2024

I'm having an issue figuring out how to disable a set of checkboxes unless its parent checkbox is checked. I only want the checkboxes in lines B, C, and D to be enabled if checkbox A is checked. If checkbox A is unchecked, anything in lines B, C, and D should reset. I've attached a screenshot below. Thank you for your help!

 

Screen Shot 2024-11-23 at 3.49.31 PM.pngexpand image

TOPICS
JavaScript , PDF , PDF forms
98
Translate
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
Community Expert ,
Nov 23, 2024 Nov 23, 2024

What is the export value of Cab Style#5?

Translate
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
New Here ,
Nov 23, 2024 Nov 23, 2024

Thank you for the quick reply! Listing name first, followed by export value (ex. Name, Export Value):

 

Checkbox A:

Cab Style; 500 Cab

 

Checkbox B:

500 Cab Design Options - Acrylic; Clear

500 Cab Design Options - Acrylic; Tinted

 

Checkbox C:

500 Cab Design Options - Rail Wall; Solid

500 Cab Design Options - Rail Wall; Acrylic

 

Checkbox D:

500 Cab Design Options - Frame; Silver

500 Cab Design Options - Frame; White

500 Cab Design Options - Frame; Black

Translate
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
New Here ,
Nov 23, 2024 Nov 23, 2024

The export value of Cab Style#5 is:

 

500 Cab

Translate
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
Community Expert ,
Nov 23, 2024 Nov 23, 2024
LATEST

You can use this code as the Mouse Up event of the first check-box:

 

 

var subFields = ["500 Cab Design Options - Acrylic", "500 Cab Design Options - Rail Wall", "500 Cab Design Options - Frame"];
if (event.target.valueAsString=="Off") {
	for (var i in subFields) this.getField(subFields[i]).readonly = true;
	this.resetForm(subFields);
} else {
	for (var i in subFields) this.getField(subFields[i]).readonly = false;
}

 

 

Edited: Small mistakes fixed in the code

Translate
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