Skip to main content
Participating Frequently
April 14, 2023
Question

How to insert text if a certain check box is selected?

  • April 14, 2023
  • 1 reply
  • 4958 views

I am creating a court order form, and there is an option for New Commitment, or to Release the defendant, both with fillable checkboxes. On the 2nd page is an order that I'd like to have the text change based on which one is selected. Is there a user friendly way to do this or would I have to rely on a script? I would need this to work on computers without Acrobat Pro as I'm the only one who has the Pro version. 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
April 14, 2023

You will need a script for that. It should work in Acrobat Reader for sure and probably on most other apps, but probably not on mobile.

Participating Frequently
April 14, 2023

Do you know what i would need to add? Sorry my knowledge of Acrobat is basic at best since I do not use it most of the time. 

Nesa Nurani
Community Expert
Community Expert
April 14, 2023

Something like this as 'Calculation' script of text field:

if(this.getField("Checkbox1").valueAsString != "Off")
event.value = "Text for checkbox 1 goes here";

else if(this.getField("Checkbox2").valueAsString != "Off")
event.value = "Text for checkbox 2 goes here";

else
event.value = "";

 

Change checkbox names in script (Orange text) to the names of your checkboxes.

Change blue text to the messages you want to show.