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

Community Beginner ,
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, General troubleshooting, How to

Views

181

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

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

Community Beginner ,
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, General troubleshooting, How to

Views

182

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
Mar 03, 2020 0
Adobe Community Professional ,
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.

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...
Mar 03, 2020 0
dr7576 LATEST
Community Beginner ,
Mar 03, 2020

Copy link to clipboard

Copied

Thank you so much, it worked like a charm.

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...
Mar 03, 2020 0