Show:

A base class for Form Builder Field Text.

Constructor

A.FormBuilderFieldText

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterAdvancedSettingsChange

() protected

<p>Fired after the a advanced settings change.</p>

_afterExpandedChange

(
  • event
)
protected

<p>Fired after the a Toggler of Advanced Settings change.</p>

Parameters:

_afterHelpChange

() protected

Fired after the help attribute is set.

_afterNestedFieldsChange

() protected

Fired after the nestedFields attribute is set.

_afterPlaceholderChange

() protected

Fired after the placeholder attribute is set.

_afterTitleChange

() protected

Fired after the title attribute is set.

_afterTypeChange

() protected

Fired after the type attribute is set.

_attachEvent

(
  • node
  • subscription
  • notifier
  • delegateNode
  • filter
)
protected

<p>Adds an event subscription.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object
  • delegateNode Object
  • filter Object

_attachEvents

(
  • node
  • subscription
  • notifier
  • filter
)
protected

<p>Adds an event subscription.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object
  • filter Object

_createAdvancedSettingsToggler

() protected

<p>Create a Toggler with the advanced settings.</p>

_createMoveTarget

(
  • position
)
Node protected

<p>Creates a move target node.</p>

Parameters:

  • position Number

    <p><p><p>The position where the moved field will be added if this is the chosen target.</p></p></p>

Returns:

Node:

_detachEvents

(
  • node
  • subscription
  • notifier
)
protected

<p>Deletes a group of event subscriptions.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object

_dispatchEvent

(
  • subscription
  • notifier
  • event
)
protected

<p>Dispatches an <code>input</code> event.</p>

Parameters:

  • subscription Object
  • notifier Object
  • event Object

_fillAdvancedSettings

() protected

Fills the advanced settings array with the information for this field.

_fillSettings

() protected

Fills the settings array with the information for this field.

_fireEvent

(
  • subscription
  • notifier
  • event
  • valueBeforeKey
)
protected

<p>Fires an event.</p>

Parameters:

  • subscription Object
  • notifier Object
  • event Object
  • valueBeforeKey Object

_getAdvancedSettings

() Array protected

<p>Gets the list of advanced settings for this field.</p>

Returns:

Array:

_getEventName

() protected

<p>Gets an event name.</p>

_getNodeName

(
  • elem
  • name
)
protected

<p>Gets a node name.</p>

Parameters:

  • elem Object
  • name Object

_getSettings

() Array protected

<p>Gets the list of settings for this field. Safer then calling the property directly, as this will lazy load the settings if they're not ready yet. Each setting should be an object with the following keys: attrName and editor.</p>

Returns:

Array:

_hasParent

(
  • node
  • testParentNode
)
protected

<p>Checks if a node has parent.</p>

Parameters:

  • node Object
  • testParentNode Object

_prepareHandles

(
  • subscription
  • node
)
protected

<p>Prepares event handles.</p>

Parameters:

  • subscription Object
  • node Object

_toggleVisibilityOfModalContent

() protected

<p>Toggle visibility classes on Modal Content.</p>

_uiSetHelp

(
  • help
)
protected

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

Parameters:

  • help String

_uiSetNestedFields

(
  • nestedFields
)
protected

<p>Updates the UI according to the value of the <code>nestedFields</code> attribute.</p>

Parameters:

  • nestedFields Array

_uiSetPlaceholder

(
  • placeholder
)
protected

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

Parameters:

  • placeholder String

_uiSetTitle

(
  • title
)
protected

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

Parameters:

  • title String

_uiSetType

(
  • type
)
protected

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

Parameters:

  • type String

_updateAdvancedSettingsChange

() protected

<p>Updates the UI according to the values of the Advanced Settings.</p>

_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:

collapseModalContent

()

<p>Collapse Advanced Settings Content.</p>

delegate

(
  • node
  • subscription
  • notifier
  • filter
)

<p>Implementation logic for subscription via <code>node.delegate</code>.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object
  • filter Object

destructor

() protected

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

detach

(
  • node
  • subscription
  • notifier
)

<p>Implementation logic for cleaning up a detached subscription.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object

detachDelegate

(
  • node
  • subscription
  • notifier
)

<p>Implementation logic for cleaning up a detached delegate subscription.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object

hasModifier

() Boolean

<p>Checks if an event is triggered by a keyboard key like <code>CTRL</code>, <code>ALT</code> or <code>SHIFT</code>.</p>

Returns:

Boolean:

initializer

() protected

<p>Constructor for the <code>A.FormBuilderFieldBase</code> component. Lifecycle.</p>

isKey

(
  • name
)
Boolean

<p>Checks if an event is triggered by a keyboard key.</p>

Parameters:

  • name Object

Returns:

Boolean:

isKeyInRange

(
  • start
  • end
)
Boolean

<p>Checks if an event is triggered by a keyboard key located between two other keys.</p>

Parameters:

  • start Object
  • end Object

Returns:

Boolean:

isKeyInSet

() Boolean

<p>Checks if an event is triggered by a keyboard key contained in the key set.</p>

Returns:

Boolean:

isModifyingKey

()

<p>Checks if an event is triggered by <code>ENTER</code>, <code>TAB</code>, <code>ESC</code> keyboard keys or by a key located between <code>PAGE UP</code> and <code>DOWN</code>.</p>

isNavKey

() Boolean

<p>Checks if an event is triggered by navigation keys like <code>PAGE UP</code> and <code>DOWN</code> keys.</p>

Returns:

Boolean:

isSpecialKey

() Boolean

<p>Checks if an event is triggered by a special keyboard key like <code>SHIFT</code>, <code>CAPS LOCK</code>, etc.</p>

Returns:

Boolean:

on

(
  • node
  • subscription
  • notifier
)

<p>Implementation logic for event subscription.</p>

Parameters:

  • node Object
  • subscription Object
  • notifier Object

removeNestedField

(
  • field
)

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

Parameters:

renderAdvancedSettings

()

<p>Renders the advanced settings on panel.</p>

renderBasicSettings

()

<p>Renders the basic settings on panel.</p>

renderSetting

(
  • setting
  • targetNode
)
protected

<p>Renders a single field setting to be edited.</p>

Parameters:

  • setting Object
  • targetNode Node

renderSettingsPanel

(
  • container
)

<p>Renders the settings panel.</p>

Parameters:

  • container Node

    <p><p><p>The container where the panel should be rendered.</p></p></p>

renderUI

() protected

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

saveSettings

()

<p>Saves the edited settings.</p>

validateSettings

() Boolean

<p>Validates all data editors used by this field's settings.</p>

Returns:

Boolean:

Attributes

content

Node

Node containing the contents of this field.

help

String

Help text.

Default: ''

name

String

Id to reference form data after a form is submitted.

Default: ''

nestedFields

Array

The fields that are nested inside this field.

Default: []

placeholder

String

Predefined value to text input.

Default: ''

strings

Object

<p>Collection of strings used to label elements of the UI.</p>

title

String

The title of this field.

Default: ''

type

Number

Determine the type of text input.

Default: 0

Events

change

<p>Defines a new <code>change</code> event in the DOM event system.</p>

contentToggle

<p>Fired when toggle the modal content.</p>

input

<p>Defines a new <code>input</code> event in the DOM event system.</p>

submit

<p>Defines a new <code>submit</code> event in the DOM event system.</p>