How to set the color of fields to know they are editable

How do I set the backcolor of form fields to a different color so the user knows that the field is editable? 

Image_3113_1758223777007

Example of what I am trying to do is how it looks when opened in Acrobat

Image_5633_1758223879746


Thank you for your help!


1 Reply 1 reply marked as answer

VS Venkada Subramanian Durai Syncfusion Team September 22, 2025 07:25 AM UTC

Hi Jill Griggs,

Thank you for your patience. You can set the background color of form fields using the updateFormField API once the document is loaded in the PDF Viewer. Please ensure that the desired color is specified correctly in the updateFormField API.
 

Kindly check if this approach meets your requirements and let us know if you have any questions.

Code snippet:
  

viewer.documentLoad = function () {

  viewer.formFieldCollections.forEach(function (field) {

    viewer.formDesignerModule.updateFormField(field, {

      //replace with required color

      backgroundColor: 'rgba(0, 20, 200, 0.2)',

    });

  });

};


Sample for updating background color


Regards,
Venkada Subramanian D


Marked as answer
Loader.
Up arrow icon