Hi,
I want to make few of the titles in the form (form/tab title and also panel title) to come dynamically from view parameter or another field in the form, Is that possible?
Thanks,
Hi,
I want to make few of the titles in the form (form/tab title and also panel title) to come dynamically from view parameter or another field in the form, Is that possible?
Thanks,
Hi,
You have to use an action-attrs
in order to achieve it. Call that action on onLoad
and/or onNew
of the form view.
Here is an example :
<form name="my-form" title="My" model="com.axelor.db.Object" onLoad="my-action">
<page title="Notes" name="somePanel">
<field name="myField">
...
</page>
</form>
<action-attrs name="my-action">
<attribute name="title" for="somePanel" expr="eval: myField == 1 ? 'Title' : 'AnotherTitle'"/>
</action-attrs>
Depending on the value of myField
, it will update the somePanel
title.