Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5269 มุมมอง

Give color for a field in form view

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

<field name="date" style = "color: red" attrs="{'invisible': [('state','!=','cancel')]}"/>

<field name="date" style = "color: green" attrs="{'invisible': [('state','=','cancel')]}"/>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Try this

< label for="your_field"  style="color:red" />

< div >
< field name="your_field" style="color:red" />
< / div >

Likewise you can change color to blue, green etc.

Hope it helps,

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

i want to change colour of field based on condition.how to do that?

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 25
1220
0
มี.ค. 25
831
0
พ.ย. 24
1444
0
มิ.ย. 24
1521
1
มิ.ย. 24
1996