Skip navigation
premio_oscar
Currently Being Moderated

Check box show hide text

Jul 12, 2012 6:05 AM

Hi,

I am new to PDF forms so sorry for my bad english

 

I have Acrobat X pro.

I would like to show text in text box when check box is "on" and when check box is off I would like to hide text in the text box.

JavaScript.

 

Any help would be much appreciated

 
Replies
  • George Johnson
    9,224 posts
    Aug 11, 2002
    Currently Being Moderated
    Jul 12, 2012 10:22 AM   in reply to premio_oscar

    In the Mouse Up event of the check box, you could use the following script:

     

     

    // Mouse Up script of check box

    getField("text1").display = event.target.value === "Off" ? display.hidden : display.visible;

     

     

    That hides/shows the entire field. If you just want to show/hide the text in the field and still display the field, you could do:

     

     

    getField("text1").value = event.target.value === "Off" ? "" : "default text goes here";

     

     

    Replace "text1" with the actual name of the text field.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points