Skip to main content
March 3, 2020
Question

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

  • March 3, 2020
  • 1 reply
  • 445 views

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, 

This topic has been closed for replies.

1 reply

Inspiring
March 3, 2020

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.

March 3, 2020

Thank you so much, it worked like a charm.