Show:

A base class for A.FormField. All form fields should extend from this.

Constructor

A.FormField

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterHelpChange

() protected

Fired after the help attribute is set.

_afterNestedFieldsChange

() protected

Fired after the nestedFields attribute is set.

_afterTitleChange

() protected

Fired after the title attribute is set.

_uiSetHelp

(
  • help
)
protected

Updates the ui according to the value of the help attribute.

Parameters:

  • help String

_uiSetNestedFields

(
  • nestedFields
)
protected

Updates the UI according to the value of the nestedFields attribute.

Parameters:

  • nestedFields Array

_uiSetTitle

(
  • title
)
protected

Updates the ui according to the value of the title attribute.

Parameters:

  • title String

_validateNestedFields

(
  • val
)
protected

Validates the value being set to the nestedFields attribute.

Parameters:

  • val Array

addNestedField

(
  • index
  • field
)

Adds the given field to this field's nested list.

Parameters:

destructor

() protected

Destructor lifecycle implementation for the A.FormField class. Lifecycle.

initializer

() protected

Construction logic executed during the A.FormField instantiation. Lifecycle.

removeNestedField

(
  • field
)

Removes the given field from this field's nested list.

Parameters:

renderUI

() protected

Create the DOM structure for the A.FormField. Lifecycle.

Properties

ATTRS

Object static

Static property used to define the default attribute configuration for the A.FormField.

Attributes

content

Node

Node containing the contents of this field.

help

String

Help text.

Default: ''

nestedFields

Array

The fields that are nested inside this field.

Default: []

title

String

The title of this field.

Default: ''