Skip to main content
New Participant
October 5, 2022
Answered

Check box then auto-populates text field.

  • October 5, 2022
  • 2 replies
  • 2408 views

Hi, 

 

Can someone help me with a script for the following problem.

 

When I check a box, I need "UNCLASSIFIED" to populate in another text fiield.

 

 

Correct answer Nesa Nurani

As 'Mouse UP' action of that checkbox, add this script and change "Text field name" to your actual name of that text field:

this.getField("Text field name").value = event.target.value == "Off" ? "" : "UNCLASSIFIED";

2 replies

Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
October 6, 2022

As 'Mouse UP' action of that checkbox, add this script and change "Text field name" to your actual name of that text field:

this.getField("Text field name").value = event.target.value == "Off" ? "" : "UNCLASSIFIED";

New Participant
November 29, 2022

Does this work for Adobe Acrobat Pro?

Nesa Nurani
Community Expert
November 29, 2022

Yes.

S_S
Community Manager
Community Manager
October 5, 2022

Hi @Jo_Sh

 

Hope you are doing well. Per the description, I understand that you want to populate a text field with clicks on the check box.

 

I have found a thread that has a solution similar to your question. Please click the link: Solved: Populate checkbox with a button click - need help wi... 

 

Let me know if this helps.

 

-Souvik.