Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Change field background color with javascript

New Here ,
Jan 19, 2025 Jan 19, 2025

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

 

TOPICS
JavaScript , PDF
236
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 ,
Jan 19, 2025 Jan 19, 2025
LATEST

Change fillcolor to fillColor (upper case C).

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
Community Expert ,
Jan 19, 2025 Jan 19, 2025
LATEST

Change fillcolor to fillColor (upper case C).

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