Skip to main content
Participating Frequently
Jan 20, 2025 1:22 AM UTC
Answered

Change field background color with javascript

I have developed a form with multiple fields with a a light gray background as set in the properties field. Once the user "Locks" the fields I want to change the background color of the fields to white. Here is the code I'm using:

 

function DisableField(cFieldName)
{
  var oFld = getField(cFieldName);
  if(oFld) {
    oFld.readonly=true;
    oFld.fillcolor=color.white;
  }
}

The fields lock but the background color does not. Any help here would be greatly appreciated. Thanks

 

PDF Automation Station
Community Expert
Jan 20, 2025 2:18 AM UTC

Change fillcolor to fillColor (upper case C).

1 reply

PDF Automation Station
Community Expert
Community Expert
Jan 20, 2025 2:18 AM UTC

Change fillcolor to fillColor (upper case C).

Translate