This question has been flagged
1 Reply
1467 Views

I have a form for Attendance. I have a field for "Leave type" and a "Present " checkbox. I want to make "Leave type" field invisible or readonly when present checkbox is checked? 

Avatar
Discard
Best Answer

Hi,

Use the following codes

<field name="Leave type" attrs="{'invisible' : [('Present', '=', True)]}"/>
<field name="Leave type" attrs="{'readonly' : [('Present', '=', True)]}"/>

Regards

Avatar
Discard