跳至內容
選單
此問題已被標幟
1 回覆
6065 瀏覽次數

Hello


how to hide required fields ?
i have checkbox when it true it hide required fields then when click on save cannot save because the  required is empty 

頭像
捨棄
最佳答案

Hi MOH,

You can make a field invisible by giving invisible attribute. In the case of the the required field, you cannot save the record untill you enter data in that field.

You can try like this, make the field as required based on the value in the checkbox.

<field name='test_field' attrs="{'required':[('check_field', '=', True)]}"/>

Along with the above you can add the attribute to make the field invisible.

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
3月 23
2707
0
11月 17
5734
2
3月 15
4703
1
3月 15
7356
3
3月 15
28814