تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6069 أدوات العرض

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
مارس 23
2718
0
نوفمبر 17
5743
2
مارس 15
4708
1
مارس 15
7359
How to hide fields? تم الحل
3
مارس 15
28818