Class: FormFieldFiller

Drupal.viewsUi.FormFieldFiller($target, excludeopt, replaceopt, suffixopt)

new FormFieldFiller($target, excludeopt, replaceopt, suffixopt)

Constructor for the Drupal.viewsUi.FormFieldFiller object.

Prepopulates a form field based on the view name.

Parameters:
Name Type Attributes Default Description
$target jQuery

A jQuery object representing the form field or fields to prepopulate.

exclude bool <optional>
false

A regular expression representing characters to exclude from the target field.

replace string <optional>
''

A string to use as the replacement value for disallowed characters.

suffix string <optional>
''

A suffix to append at the end of the target field content.

Source:

Members

exclude :bool

Type:
  • bool
Source:

replace :string

Type:
  • string
Source:

source :jQuery

Type:
Source:

suffix :string

Type:
  • string
Source:

target :jQuery

Type:
Source:

Methods

_populate()

Populate the target form field with the altered source field value.

Source:

_unbind()

Stop prepopulating the form fields.

Source:

bind()

Bind the form-filling behavior.

Source:

getTransliterated() → {string}

Get the source form field value as altered by the passed-in parameters.

Source:
Returns:

The source form field value.

Type
string

populate() → {*}

Populate the target form field with the altered source field value.

Source:
Returns:

The result of the _populate call, which should be undefined.

Type
*

rebind($fields)

Bind event handlers to new form fields, after they're replaced via Ajax.

Parameters:
Name Type Description
$fields jQuery

Fields to rebind functionality to.

Source:

unbind() → {*}

Stop prepopulating the form fields.

Source:
Returns:

The result of the _unbind call, which should be undefined.

Type
*