I know it's possible to style the label field, is it possible to style the name field?

491
3
01-13-2020 12:23 PM
LisaSmith1
New Contributor II

I am parsing a barcode and want to display the information in different bold colors to have info for the survey user to easily see and validate. Is this possible?  I know how to style the label field in the survey but is it possible to style input or output of a name field? 

For example, if a barcode is scanned and it doesn't match what is expected, the survey user would like to see the incorrect barcode value in bold red or highlighted. 

Thanks

Tags (4)
0 Kudos
3 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Lisa,

Depending on how complex the barcode check is, this may be possible via a series of calculations (using concat() to create HTML with the barcode value).  If the barcode check logic is complex, you may need to use a beta feature - custom JavaScript functions - to do the check.

0 Kudos
LisaSmith1
New Contributor II

Thanks, James. The barcode check logic is VERY simple. When the barcode is parsed, the only thing displayed on the form is a sequence number that is printed on all the supplies that the user is supposed to verify before distributing the supplies. If that number is incorrect, the survey user wanted the value that is displayed on the screen to be bold red or highlighted in some fashion. I know there are things like <font color="red"><b>[insert text here]<b></font> that can be used in the label column to change the style but I don't see information how to change the font, color, etc of input either calculated to display or input from the user that is displayed, But thinking about that, it makes more sense to display the CORRECT sequence number that is parsed from the barcode in bold because that's the number the user should be searching for on the supplies. I did that as a note and that works fine.

Are you saying that information either entered by the survey user or calculated to display on the form CAN be styled with different fonts, colors, etc?  Where do I find information about that?  

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Lisa,

Read-only text (note) questions can be styled with HTML.  They can also use calculations, allowing you to do something like:

concat('Tobacco: <font color="', if(${age}<21,'red">Restricted','blue">Allowed'),'</font>')

0 Kudos