This question has been flagged
1 Reply
2915 Views

I need to detect when a user is in add (new) mode when the view is loaded or in edit mode.

I need this because I want to hide a few fields when the user is adding a new entry and show them when the user is editing an entry.

TIA

Avatar
Discard
Best Answer

Use invisible attribut with dynamic conditions. See for example:

<field name="field1"/>
<field name="field2" attrs="{'invisible':[('field1','=','some_value')]}"/>

field2 will show or not depended from value field1.

Avatar
Discard