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

Hi,

How to make a field readonly based on some condition? For instance i want to make fields readonly on form load based on some values from another table.

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

Hello Binyam Assefa ,

 To make readonly field based on condition you can use "attrs" attribute in field tag as follows :

 <field name="field_name" attrs="{'readonly' : [domain]}"/>

 Hope this will work for you.

Thanks!

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

Thanks Jainesh Shah,

So i have to declare fields that contains some calculated values from another domains to use it here in the current view.

Related Posts ตอบกลับ มุมมอง กิจกรรม
readonly option in fields? แก้ไขแล้ว
3
ธ.ค. 23
91001
3
ก.ย. 21
5100
1
ก.ย. 15
8944
4
เม.ย. 25
5290
3
ก.ค. 23
5720