How to change the editability of a page with button

Hello guys, I want to set two buttons to open a same form, one is editable and the other is read-only, how to achieve it? (Mendix version: 10.7.0)
1 answers

Hi Bo Fu,


I think your best option would be:

  1. Create a non-persistable entity with a boolean attribute 'Editable'
  2. Before opening the page, create an object of this entity and set the 'Editable' attribute.
  3. Show the page (form) with this object as parameter, as well as your form object.
  4. In the page set the editability of the dataview based on the 'Editable' attribute


Hope this helps!