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 put the element:
style(bgcolor = "<color>")
after the question text in the metadata section, or type:
<question_name>.Style.BgColor = "<color>"
in the routing section, where:
▪<question_name> 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:
<other_response_name> ["<response_text>"] other (<other_question> "<other_question_text>" style(bgcolor = "<color>") <data_type>)
where:
▪<other_response_name> is the name of the Other response.
▪<response_text> is the text of the Other response.
▪<other_question> is the name for the automatic Other Specify question.
▪<other_question_text> is the text for the automatic Other Specify question.
▪<color> is the background color entered as a text or RGB value.
▪<data_type> 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:
<question_name>.Categories[{<other_response>}].OtherQuestion.Style.BgColor = "<color>"
where:
▪<question_name> is the question name.
▪<other_response> is the name of the Other Specify response.
▪<color> is the background color for the box, specified as a text or as an RGB value.
To produce the pale green box shown in the previous illustration, type:
MoreTV.Categories[{OtherSport}].OtherQuestion.Style.BgColor = "#C0FFFF"
See also