How to Check A box if a field is not blank

New Here ,
Nov 05, 2018

Copy link to clipboard

Copied

I want to have a checkbox checked if a certain field is not blank.

I have tried this formula in the text field

if (event.value=="")
{this.getField("Check Box10").value="Off"}
else
{this.getField("Check Box10").value="Yes"}

But it is not working any Ideas?

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

- Is the export value of the check-box really "Yes"?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

115

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

How to Check A box if a field is not blank

New Here ,
Nov 05, 2018

Copy link to clipboard

Copied

I want to have a checkbox checked if a certain field is not blank.

I have tried this formula in the text field

if (event.value=="")
{this.getField("Check Box10").value="Off"}
else
{this.getField("Check Box10").value="Yes"}

But it is not working any Ideas?

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

- Is the export value of the check-box really "Yes"?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

116

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
Nov 05, 2018 0
Most Valuable Participant ,
Nov 05, 2018

Copy link to clipboard

Copied

- What kind of field is the second field?

- Where did you place the code?

- Are there any error messages in the JS Console after you change the field's value? (press Ctrl+J to open it)

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
Reply
Loading...
Nov 05, 2018 1
Most Valuable Participant ,
Nov 05, 2018

Copy link to clipboard

Copied

- Is the export value of the check-box really "Yes"?

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
Reply
Loading...
Nov 05, 2018 2