Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

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

New Here ,
Sep 30, 2022 Sep 30, 2022

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.

 

TOPICS
How to , JavaScript , PDF forms , Rich media and 3D
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Sep 30, 2022 Sep 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 30, 2022 Sep 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-t... 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

AkanchhaS_0-1664554800188.png

 

Thanks,

Akanchha 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2022 Sep 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 Screenshot 2022-09-30 220939.pngScreenshot 2022-09-30 221029.png

this is what i want to acheive..thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2022 Sep 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 01, 2022 Oct 01, 2022
LATEST

how can i make these javascript properties default for all new fields instead of setting it up manually everytime..even if i set "use current properties as new default"..javascript properites are not copied

thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines