Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6105 Переглядів

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
2756
0
лист. 17
5785
2
бер. 15
4763
1
бер. 15
7421
How to hide fields? Вирішено
3
бер. 15
28894