new FormOptionFieldBase()
Extends
- module:FormView~FormOptionFieldBase
Methods
-
updateEnum(enums)
-
Placeholder method for updating the saved value in the option field. This method is intended to be overridden by the child class. The overriding method should contain the logic for updating the 'enum' value.
Parameters:
Name Type Description enums
Array An array of primitive values to be saved in the option field.
-
updateEnumNames(enumNames)
-
Placeholder method for updating the display value in the option field. This method is intended to be overridden by the child class. The overriding method should contain the logic for updating the 'enumNames' value.
Parameters:
Name Type Description enumNames
Array An array of display values for the option field.
-
applyState(state)
-
Applies the full state of the field to the HTML. Generally done just after the model is bound to the field.
Parameters:
Name Type Description state
Object The state object.
-
updateEnumForRadioButtonAndCheckbox(newEnums, createItemCallback)
-
Common method to update the enums of checkbox and radiobutton
Parameters:
Name Type Description newEnums
Array updated enum values
createItemCallback
CallableFunction function to create options
-
updateEnumNamesForRadioButtonAndCheckbox(newEnumsNames, createItemCallback)
-
Common method to update the enums Names of checkbox and radiobutton
Parameters:
Name Type Description newEnumsNames
Array updated enum Names values
createItemCallback
CallableFunction function to create options