Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Custom states can be applied on form fields and it consist in a name and options. It's displaying a custom icon (set in options) and some specific style on the field.

If the EventOnCustomStateChange is set in designer, than every time the custom state is changed, the event is triggered and you can see the action (set or clear) and the customState that had been added/removed.


Custom states attributes:

attributevalues
namethe name of the custom state
option

icon - font awesome class of an icon (ex: "fas fa-exclamation-triangle")


Example
// get a field, like the selfdesc field from offerheaderdata form.
var field1 = akioma.root.dynObject.getObject('offerheaderdata').getField('selfdesc');
// add a custom state to that field, with an alert icon
field1.controller.setCustomState('Alert1', {icon: 'fas fa-exclamation-triangle'});
// remove the custom state from that field
field1.controller.clearCustomState('Alert1');
  • No labels