Set background color for read-only questions

1834
4
11-29-2018 06:27 AM
JürgenBiendara1
New Contributor III

Hello,

I would like to set the background of read-only questions (i. e. the input field) to a different color, e. g. a light grey, to differentiate them optically from open/editable fields.

Is there a way to do this and if not, would that be something to be considered for a future release of Survey123?

Thank you very much, best regards,

Jürgen

0 Kudos
4 Replies
RogerMesen-Delgado
Occasional Contributor

Hello, I'm not sure if I understand your question. But you can change the Background color of the label. All the style in survey132‌ you can change it with html(in the Survey123 Connect). Check this line of code for example: <p style="background-color:rgb(255, 0, 0);">  

PD: You can check the color code in this web: RGB Color Codes Chart .

Let me know if this helps. 

0 Kudos
JürgenBiendara1
New Contributor III

Hi Roger,

Thank you for replying to my request. Actually, the solution you are providing is not exactly what I am looking for. Please have a look at this example:

Diameter is an editable field, Surface is calculated from the diameter value. Surface is a read-only field. The light-grey background of the field shall disclose that this field cannot be edited.

Best regards,

Jürgen

0 Kudos
RT_Source2TapGIS_User
New Contributor

I've done something like this by using the Note field type and that gives the grey background:

Here's what the xlsx looks like:

I use the calculation field to set the value of the field.

0 Kudos
JürgenBiendara1
New Contributor III

That's an easy and simple trick, thank you.

0 Kudos