Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6084 Lượt xem

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 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 23
2720
0
thg 11 17
5759
2
thg 3 15
4721
1
thg 3 15
7372
How to hide fields? Đã xử lý
3
thg 3 15
28863