Skip to main content
Nintex Community Menu Bar

Conditional style drop down

  • July 29, 2019
  • 2 replies
  • 53 views

Hello,

We want to change the selected text color and background of dropdown.  Changing the background of dropdown works but text color doest work.

 

Any idea how can we change the selected dropdown value color conditionally ?

2 replies

Forum|alt.badge.img+9

Albarghouthy
Forum|alt.badge.img+16

Hi,


 


Please try this script


<script>
$('div.input-control-m-c > div > a > span').css({'color' :'blue'});
</script>

Instead of using conditional style, you will need to add a condition on the change event of the dropdown list, example:


 


If Vlaue = X


Transfer script to a Data Label


Clear Data Label


Else


Transfer Script (different font color) to Data Label 


Clear Data Label


 


Make sure to check literal and uncheck preventXSS in the data label properties


 


HTH