I have a form including several select fields where a colour can be chosen, eg:
I want these lists to be populated dynamically and have set up a table where the user can add colours and choose which colours should appear etc… The problem is, I don’t seem to be able to style the list so each <option> has a background colour.
The static version (which produces the select above) starts like this:
I applied the dynamic style using the UI, but no styles are generated. Have I done something wrong or is some special attribute needed to apply styles in this situation?
Well the dynamic attributes and all the properties are applied to the whole select, there is no option to style the different options inside.
I’ll check if we can add dynamic style/class options for the <option> tags in the next updates.
Thanks - I would be very grateful if it could be added.
It’s not something I would very often need, but it’s frustrating to come across features which are simply not possible in Wappler. I had done quite a bit of work in relation to this, assuming - without checking - that the matter of actually applying the styles wouldn’t be an issue.
That’s not the most frequent request related to dropdowns, so we just haven’t thought it could be useful to style separate options of a dynamic dropdown. In most of the cases users want to style the whole dropdown the same way.
Anyway, it shouldn’t be a big issue to add this. @George will check this
I just came across a need for this again. Hardly critical, but if it's not a big issue, it would be good if it could be added at some point. Although it's a feature request, it seems that it's something that was perhaps overlooked.
Thanks @zitroware. I was using a clever solution by @Heather_Mann, using Javascript, but this is a great ‘native’ Wappler solution (which I didn’t think was possible).