Make a field visible depending on another boolean field

Hello people, I have a query.
It is as follows: I would like a field to appear based on a condition (True or False).
For example:
“add_Address” is a “bool” field, if it is “True”, another field appears in the form to fill “address2”. I can’t find the correct syntax.

<label name="address1"/>
<field name="address1"/>
<label name="add_Address"/>
<field name ="add_Address"/>
<label name="address2"/>
<field name="address2"/> 
<label name="cellphone"/>
<field name="cellphone"/>

You must set invisible key of the states of the address2 field like:

    'invisible': ~Eval('add_Address'),

thank you very much, it worked

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.