Skip to main content
Participant
April 11, 2024
Question

Dropdown list scripting to make each selection different color or background

  • April 11, 2024
  • 1 reply
  • 215 views

I have a customer that has a dropdown list with Pass, Fail, and OUO.  He would like the Pass to be BOLD and Green when selected, the Fail to be BOLD and Red when Selected, and the OUO to be BOLD and black.  I am having trouble with the scripting for this... Please help..

Jill

This topic has been closed for replies.

1 reply

Mylenium
Legend
April 11, 2024

I don't think you can do this. You can only apply custom formating to some elements in script panels and the whole process is very limited. If you really want visual distinctiveness it might make more sense to create custom buttons with icons.

 

Mylenium

Participant
April 11, 2024

I have seen several different examples of scripting for this, I am just not sure how to rename them for my situation... I am working in AEM Designer and know that I can at least make the background colors change based on the selection, but again I am not sure how to script it in either javascript or formcalc.