Dynamic placeholder component.
Classes
Methods
(static) .create(formItem) → {DynamicPlaceholder}
Creates and registers a dynamicPlaceholder.
Parameters:
Name | Type | Description |
---|---|---|
formItem |
Node | the form element |
Returns:
- the DynamicPlaceholder object
- Type
- DynamicPlaceholder
Example
UCASDesignFramework.dynamicPlaceholder.create($myFormItem)
(static) .destroy(formItem)
Parameters:
Name | Type | Description |
---|---|---|
formItem |
Node | the form element |
Example
UCASDesignFramework.dynamicPlaceholder.destroy($myFormItem)
(static) .init(contextopt, selectoropt) → {Boolean}
Initialises any form items it finds that have a data-dynamic-placeholder attribute
which contains a JSON array of placeholders which it will cycle through.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
context |
Node |
<optional> |
document | context to limit the selector |
selector |
String |
<optional> |
.v5-form-item [data-dynamic-placeholder] | a valid CSS selector for the placeholder data attribute |
Returns:
- true for success
- Type
- Boolean
Example
UCASDesignFramework.dynamicPlaceholder.init()