Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Input boxes for numeric, text, date, and other specify responses > Box color
 
Box color
Numeric, text, and date questions
Input boxes are normally white. To display input boxes for numeric, text, or date questions in a different color, do one of the following. Either place the element:
style(bgcolor = "color")
after the question text in the metadata section, or type:
Qname.Style.BgColor = "color"
in the routing section, where:
Qname is the question name.
color is the background color for the box, specified as a text or RGB value.
For example:
DOB1 "Please enter your date of birth." style(bgcolor = "pink") date;
If the question did not define the background color, it could have been set in the routing section with:
DOB.Style.BgColor = "pink"
“Other Specify” responses
To set the background color for the Other Specify box in the metadata section, define the Other response as follows:
OthRespName ["RespText"] other (OthQname "OthQtext" style(bgcolor = "color") Qtype)
where:
OthRespName is the name of the Other response.
RespText is the text of the Other response.
OthQname is the name for the automatic Other Specify question.
OthQtext is the text for the automatic Other Specify question.
color is the background color entered as a text or RGB value.
Qtype is the data type for the automatic Other Specify question (usually text).
For example:
MoreTV1 "Which sport would you like to see more of on TV?" categorical [1..1]
{
  Swimming, Diving, Polo, Curling, Windsurfing,
  OtherSport "Other sport" other
    (MoreTVOthQ "Please specify." style(bgcolor = "#C0FFFF")
        text)
};
To define the box’s background color in the routing section, type:
Qname.Categories[{OtherName}].OtherQuestion.Style.BgColor = "color"
where:
Qname is the question name.
color is the background color for the box, specified as a text or as an RGB value.
OtherName is the name of the Other Specify response.
To produce the pale green box shown in the previous illustration you would type:
MoreTV.Categories[{OtherSport}].OtherQuestion.Style.BgColor = "#C0FFFF"
See also
Input boxes for numeric, text, date, and other specify responses