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

Checking Checkbox when I am clicking button All

New Here ,
Dec 01, 2017 Dec 01, 2017

Good Day.

I am trying to create a adobe form where if I click on the button All Days all checkbox for days will be check.

I when in the properties of All Days under the tab Actions and try to add an action Run a JavaScript

the field name is Check 1 and so on until Check 31

var a1 = this.getField("Check 1");
var a2 = this.getField("Check 2");

a1.value = "On";
a2.value = "Off";

2017-12-01 8-55-30 AM.jpg

2017-12-01 8-55-55 AM.jpg2017-12-01 8-56-05 AM.jpg

2017-12-01 8-56-23 AM.jpg

2017-12-01 8-56-29 AM.jpg

2017-12-01 8-56-34 AM.jpg

505
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

correct answers 1 Correct answer

Community Expert , Dec 01, 2017 Dec 01, 2017

To check the boxes:

for (var i=1; i<=31; i++) this.getField("Check "+i).checkThisBox(0, true);

To uncheck them replace true with false.

Translate
Community Expert ,
Dec 01, 2017 Dec 01, 2017

What's your question?

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 ,
Dec 01, 2017 Dec 01, 2017

I would like to know the code to be able to check and uncheck the checkbox when I am clicking on All button

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 ,
Dec 01, 2017 Dec 01, 2017
LATEST

To check the boxes:

for (var i=1; i<=31; i++) this.getField("Check "+i).checkThisBox(0, true);

To uncheck them replace true with false.

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