Custom states can be aplied 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 everytime 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:
attribute | values |
---|---|
name | the name of the custom state |
option | icon - font awesome class of an iconĀ (ex: "fas fa-exclamation-triangle") |
Examples:
Getting a field to test. Ex: selfdesc field from offerheaderdata form.
var field1 = akioma.root.dynObject.getObject('offerheaderdata').getField('selfdesc')
Add a custom state with an alert icon
field1.controller.setCustomState('Alert1', {icon: 'fas fa-exclamation-triangle'})
Remove a custom state
field1.controller.clearCustomState('Alert1')