Skip to main content
Known Participant
April 4, 2024
Question

Changing the entry background of specific fields only

  • April 4, 2024
  • 2 replies
  • 479 views

Hi

I am trying to alter the background colour of specific entry fields in a form from the standard pale blue (HEX: #CCD7FF) to a Yellow colour to make it stand out to people who have to enter information into the form.

 

I have created the following javascript, which I have cobbled from a number of different sources and put it into the Custom Calculation Script section of the Field Properties, but it isn't working:

 

var theBackground = null;

function setBackgroundColor = ["RGB",204/255,215/255,255/255];//(HEX:#CCD7FF)
{
theBackground.setColor(new Color(["RGB",253/255,202/255,11/255];//(HEX:#FDCA0B)));
}

Can an expert in Javascript help me with the above so that it works?

 

Thank you in Advance.

Nicole

    This topic has been closed for replies.

    2 replies

    Known Participant
    April 5, 2024

    Never mind I worked out how to do it.

    John T Smith
    Community Expert
    Community Expert
    April 4, 2024

    When you post a question you always need to tell the Adobe program you are using
    There are MANY programs in a full subscription, plus other non-subscription programs
    Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum

    Known Participant
    April 4, 2024

    Sorry I thought I had posted this in the Acrobat Community not the general one. It is for pdf Forms.

    kglad
    Community Expert
    Community Expert
    April 5, 2024

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



    <"moved from using the community">