Skip to main content
Participating Frequently
September 30, 2022
Answered

how to reveal a field when i hover over it then hide it when i remove the cursor

  • September 30, 2022
  • 1 reply
  • 1787 views

hi,

i am a teacher and i want to create a field which hides itself and reveals the text below it but when i hover away it  hides it again. That will be super useful to test my students. I have been trying to figure out a way.

can anyone please help.

 

This topic has been closed for replies.
Correct answer Thom Parker

Use the Mouse Enter and Mouse Exit events to change background color of the field between a solid color and transparent. Actually hiding the field will keep the field from recieving the trigger events.  

 

For Mouse Enter to hide the field use this JavaScript code:

event.target.fillColor = ["T"];

 

For the Mouse Exit to show the field use this JavaScript code:

event.target.fillColor = color.white;

 

 

 

1 reply

AkanchhaS8194121
Legend
September 30, 2022

Hi @soot26370632ta2t 

 

Thanks for reaching out.

Are you willing to hide the entire form field content file only? Also, 

 

Check this custom script, which might help for the same requirement https://community.adobe.com/t5/acrobat-discussions/pdf-forms-pop-to-show-correct-result-when-hover-the-mouser-over-form-field/td-p/12107081 Or the form fields inbuilt property Tooltip. 

Right-click on a form filed> Properties>General> Tootip

 

Also, you can also set the form filed common properties as its visibility under Properties>General

 

Thanks,

Akanchha 

 

Participating Frequently
September 30, 2022

i just want to create a field which hides/becomes transparent when i hover over it and when i remove my cursor it should reappear 

this is what i want to acheive..thank you

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
September 30, 2022

Use the Mouse Enter and Mouse Exit events to change background color of the field between a solid color and transparent. Actually hiding the field will keep the field from recieving the trigger events.  

 

For Mouse Enter to hide the field use this JavaScript code:

event.target.fillColor = ["T"];

 

For the Mouse Exit to show the field use this JavaScript code:

event.target.fillColor = color.white;

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often