Set form background color
Changes the background color of all form fields on focus.
(function () {
let doc = Api.GetDocument();
// Define the desired background color (light blue in RGB).
let red = 171;
let green = 242;
let blue = 255;
// Get all form fields in the document.
let formFields = doc.GetAllForms();
// Iterate through each form field and set the background color.
formFields.forEach(function(field) {
field.SetBackgroundColor(red, green, blue);
});
})();
Methods used: GetDocument, GetAllForms, SetBackgroundColor
Result