Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
6041 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
мар. 23
2657
0
нояб. 17
5724
2
мар. 15
4682
1
мар. 15
7329
3
мар. 15
28795