-
Config
- barHeight
-
bbar
- bbarHeight
-
buttons
- buttonsHeight
- cls
- defaults
- draggable
-
events
-
footer
- height
- id
- i18n
-
items
- column
-
data
- defaults
- disabled
- displayKey
- editable
- emptyText
- events
-
format
- itemCheckBox
- inputHeight
- inputLabel
- inputWidth
- label
- labelAlign
- labelWidth
- listItemTpl
- leftTpl
- leftWidth
- max
- min
- minListWidth
- multiSelect
- multiToggle
- name
- showPassTip
- spin
- step
- subSearch
- tabIndex
- tip
- type
- value
- valueKey
- vtype
- width
-
lang
-
date
- method
- modal
- params
- renderOuter
- renderTo
- scrollable
- shadow
-
subTitle
-
subTBar
- allowToggle
- action
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- subTBarHeight
-
tbar
- allowToggle
- action
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- tbarHeight
-
title
textarea
Textarea field type
Example
items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' ...
Properties
cls
StringThe CSS class that will be added to field.
It is used for custom styling field.items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About', cls: 'field-about' },{ ... }]
editable
BooleanIt enables/disable editing field value.
... items: [{ editable: false, label: 'About', type: 'textarea', name: 'about' ...
true emptyText
StringPlaceholder text.
... items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' },{ ...
events
ArraySet event handler to field.
... items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' events: [{ change: function(){ } }] },{ ...
id
StringIf to set id, it will be possible to get link on widget over
Fancy.getWidget
.tbar: [{ type: 'textarea', id: 'info', value: 'Info about Car' },{ ... }] ... var textField = Fancy.getWidget('info'); textField.set('Kia Sportage');
label
StringText of field.
... items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' },{ ...
labelAlign
StringAlign of label.
Values:
right
,left
,top
.... items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About', labelAlign: 'right' },{ ...
left name
StringName of field over which it is possible to get value of field.
... items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' },{ ...
tabIndex
NumberSets a DOM tabIndex for this field.
tabIndex may be set to -1 in order to remove the field from the tab rotation.
Available for fields with input.{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About', tabIndex: 2 }
undefined tip
String|NumberField tip.
}, { label: 'Name', tip: 'Name', emptyText: 'Name', name: 'name' }, { label: 'SurName', tip: '{value}', emptyText: 'SurName', value: 'Johnson', name: 'surname' }, { label: 'E-mail', emptyText: 'E-mail', name: 'email', tip: function(field, value, label) { return field.label; } }, {
Sample on JSFiddle
undefined type
StringType of field (value - textarea).
{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About' }
value
BooleanValue of field.
items: [{ label: 'About', type: 'textarea', name: 'about', value: 'About' ...
Methods
blur
()Blur field.
field.blur();
clear
()Clear value.
tbar: [{ type: 'textarea', id: 'info', value: 'Info about Car' },{ ... }] ... var textField = Fancy.getWidget('info'); textField.clear();
disable
()Disable field.
field.disable();
enable
()Enable field.
field.enable();
focus
()Focus field.
field.focus();
get
():Stringreturn value of field.
tbar: [{ type: 'textarea', id: 'info', value: 'Info about Car' },{ ... }] ... var textField = Fancy.getWidget('info'); textField.get();
set
(value: String)Set value of field.
tbar: [{ type: 'textarea', id: 'info', value: 'Info about Car' },{ ... }] ... var textField = Fancy.getWidget('info'); textField.set('Kia Sportage');
setWidth
(value: Number)Set new field width.
field.setWidth(400);
validate
():BooleanForce field validation.
It returns validation status.field.validate();
Events
blur
(field)Losing focus from field event.
items: [{ type: 'switcher', label: 'Active', name: 'active', value: true, events: [{ blur: function(){ } }] ...
change
(field, value)Change field value event.
items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About', events: [{ change: function(){ }, scope: {}//not required }] ...
focus
(field)Focus field event.
items: [{ label: 'About', type: 'textarea', name: 'about', emptyText: 'About', events: [{ focus: function(){ } }] ...
-
date