Skip to main content
Participant
September 30, 2020
Question

How to make the fill color disappear automatically when text is entered.

  • September 30, 2020
  • 1 reply
  • 414 views

Hi, 

 

I'm wondering if someone can help me with the text field properties.  My ultimate goal is to have the text boxes in my fillable PDF all be yellow until text is entered.  Once anything text is entered in the text box, I want the yellow to disappear.  I believe to do this I need to run a custom validation script but I am unsure what to entered to actually make it do what i want.  Any help would be appreciated!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 1, 2020

Use this:

event.target.fillColor = (event.value==event.target.defaultValue) ? color.yellow : color.transparent;