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

Checking Checkbox when I am clicking button All

New Here ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

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

Views

494
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 , 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.

Votes

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

Copy link to clipboard

Copied

What's your question?

Votes

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

Copy link to clipboard

Copied

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

Votes

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

Copy link to clipboard

Copied

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.

Votes

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