HI all,
I struggled a bit with the situation, trying to add css class to a field.
This was my first attempt, which didn´t really work correct in the process, even if the classes were added correctly on the field:
- If test_field == True add class for decoration-danger
- and always add test_class
Classes were set correct on the field, but it didn´t change if test_field was != True
xpath expr="//field[@name='user_id']" position="attributes" attribute name="decoration-danger" "user_id_timeoff==True" attribute attribute name="class" time_off_warning attribute
xpath
Then after a lot of wondering and some info on google, I tried this, and it worked just fine even if I wanted to avoid replacing the user_id field:
xpath expr="//field[@name='user_id']" position="replace"
field name="user_id" class="time_off_warning" decoration-danger="user_id_timeoff==True"
xpath
Sorry can´t post it other than that