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. |
Members
exclude :bool
Type:
- bool
replace :string
Type:
- string
source :jQuery
Type:
suffix :string
Type:
- string
target :jQuery
Type:
Methods
_populate()
Populate the target form field with the altered source field value.
_unbind()
Stop prepopulating the form fields.
bind()
Bind the form-filling behavior.
getTransliterated() → {string}
Get the source form field value as altered by the passed-in parameters.
Returns:
The source form field value.
- Type
- string
populate() → {*}
Populate the target form field with the altered source field value.
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. |
unbind() → {*}
Stop prepopulating the form fields.
Returns:
The result of the _unbind call, which should be undefined.
- Type
- *