View Attributes
View attributes are usually set directly in the XML of the view. Some of them can also be updated thanks to Attrs Actions.
But we can also configure view attributes directly from the UI for and even more advanced configuration.
Overview
The configuration of these enhanced view attributes is done from the application UI, in the menu Administration → View Management → View Attributes.

They are evaluated on form view events onNew
and onLoad
, even if these attributes are not defined explicitly in the form view.
These attributes take the precedence over the ones defined on the XML view and in the action-attrs (only during onNew
and onLoad
events for this latter).
Available Fields
-
Model (Required) - The FQN of the name on which the view attribute should be applied.
-
View (Optional) - The name of the form view on which the view attribute should be applied. If empty, the attribute will be applied on all the form views representing the given model.
-
Field (Required) - The field on which the attribute should be applied. Custom fields are supported (example: attrs.myCustomField).
-
Order (Optional) - If several records set the same view attribute, define which one has the priority.
-
Name (Required) - The name of the attribute we want to set. Can be any value handled by usual Attrs Actions.
-
Name (Required) - The value of the attribute we want to set.
-
Condition (Optional) - A JS expression to set the attribute value if and only if the expression evaluates to true.
-
Roles (Optional) - A set of user roles on which this view attribute will be applied. If empty, the view attribute will be applied to all the users.