Hi folks. I found this Changing color based on score article, but the XLSForm solution doesn’t seem to work anymore.
Hi @22Derebe ,
Try using this formula:
if((${Q1} <=7), ‘<span style=”color:red”>Low</span>’, if((${Q1} >= 8 and ${Q1} <= 11), ‘<span style=”color:yellow”>Medium</span>’,if((${Q1} >= 12),’<span style=”color:green”>High</span>’,'')))
Reference xlsform:
Changing colour with the value.xlsx (11.3 KB)
Have a great day!
I uploaded only that example XLSForm to test and currently the span
html is escaped before being displayed/returned in the web interface:
Is this a known issue or is there another suggested way to allow using HTML spans that are returned from a calculate
field?
1 Like
@jessedp , it seems like you are using Enketo
for this. Could you try it out in the Collect Android App
to see how it behaves?
1 Like
Sigh. Yes, it works in the Android app.
Guess we’ll need to use the Enketo web-based forms - the work around I came up with for now is to use your same XLSForm setup, but with emojis ( , , , etc) in place of the styled spans for a semi-similar visual indicator. Thanks for the quick reply!