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

Get a Check Box to Display Specific Text If box is Checked and Unchecked

Community Beginner ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

Looking for some help with Javascript. 
i am hoping to have adobe display a specific text if my check box is checked off, and a default text when the box is not checked off. 
example, 
the tool that i am working on must allow the user to verify that all information is provided in certain cases, at the end of the form the user has the option of selecting if the information has "Passed" , thus when the check box is selected there is a text field on the previous page that should display "Pass".
i would also like the text field to default to "Fail" when the box is not selected.
hoping someone can help me with this. 

thanks, 

TOPICS
Acrobat SDK and JavaScript

Views

308

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
community guidelines
LEGEND ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

You can use the following as the custom Mouse Up script for the check box:

 

 

// Mouse Up script for check box
getField("Text1").value = event.target.value !== "Off" ? "Pass" : "Fail";

 

 

Change "Text1" to the actual name of the text field.

Votes

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
community guidelines
Community Beginner ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

LATEST

Thank you so much, it worked like a charm.

Votes

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
community guidelines