A.FormFieldChoice Class
A base class for Form Field Choice.
Constructor
A.FormFieldChoice
-
config
Parameters:
-
configObjectObject literal specifying widget configuration properties.
Index
Methods
- _afterHelpChange
- _afterNestedFieldsChange
- _afterOptionsChange
- _afterOtherOptionChange
- _afterTitleChange
- _afterTypeChange
- _cleanOptionsContainer
- _createOptionNode
- _getFormClass
- _setFormType
- _uiSetHelp
- _uiSetNestedFields
- _uiSetOptions
- _uiSetOtherOption
- _uiSetTitle
- _uiSetType
- _updateOptionsContainer
- _validateNestedFields
- addNestedField
- destructor
- initializer
- removeNestedField
- renderUI
Attributes
Methods
_afterHelpChange
()
protected
Fired after the help attribute is set.
_afterNestedFieldsChange
()
protected
Fired after the nestedFields attribute is set.
_afterOptionsChange
()
protected
Fired after the options attribute is set.
_afterOtherOptionChange
()
protected
Fired after the otherOption attribute is set.
_afterTitleChange
()
protected
Fired after the title attribute is set.
_afterTypeChange
()
protected
Fired after the type attribute is set.
_cleanOptionsContainer
()
protected
Remove all option element from ui.
_createOptionNode
-
optionLabel
Create a option node.
Parameters:
-
optionLabelString
Returns:
<p>A new Option Node</p>
_getFormClass
-
type
Gets the appropriate css class to form for the given type.
Parameters:
-
typeString
Returns:
_setFormType
-
type
Switch option type between radio and checkbox.
Parameters:
-
typeString
_uiSetHelp
-
help
Updates the ui according to the value of the help attribute.
Parameters:
-
helpString
_uiSetNestedFields
-
nestedFields
Updates the UI according to the value of the nestedFields attribute.
Parameters:
-
nestedFieldsArray
_uiSetOptions
-
options
Updates the ui according to the value of the options attribute.
Parameters:
-
optionsArray
_uiSetOtherOption
-
otherOption
Updates the ui according to the value of the otherOption attribute.
Parameters:
-
otherOptionBoolean
_uiSetTitle
-
title
Updates the ui according to the value of the title attribute.
Parameters:
-
titleString
_uiSetType
-
type
Updates the ui according to the value of the type attribute.
Parameters:
-
typeString
_updateOptionsContainer
()
protected
Set a new options container based on type attribute.
_validateNestedFields
-
val
Validates the value being set to the nestedFields attribute.
Parameters:
-
valArray
addNestedField
-
index -
field
Adds the given field to this field's nested list.
Parameters:
-
indexNumber -
fieldA.FormField
destructor
()
protected
Destructor lifecycle implementation for the A.FormField class.
Lifecycle.
initializer
()
protected
Constructor for the A.FormFieldChoice. Lifecycle.
removeNestedField
-
field
Removes the given field from this field's nested list.
Parameters:
-
fieldA.FormField
renderUI
()
protected
Create the DOM structure for the A.FormFieldChoice. Lifecycle.
Properties
ATTRS
Object
static
Static property used to define the default attribute configuration
for the A.FormFieldChoice.
TYPES
Object
static
Static property which contains all the valid A.FormFieldChoice types.