textarea

Textarea field type

Example


items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
...

Properties

emptyText

String

Placeholder text.


...
items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
},{
...

events

Array

Set event handler to field.


...
items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
  events: [{
    change: function(){
      
    }
  }]
},{
...

id

String

If 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

String

Text of field.


...
items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
},{
...

labelAlign

String

Align of label.

Values: right, left, top.


...
items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About',
  labelAlign: 'right'
},{
...
left

name

String

Name of field over which it is possible to get value of field.


...
items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
},{
...

type

String

Type of field (value - textarea).


{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About'
}

value

Boolean

Value of field.


items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  value: 'About'
...

Methods

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();

get

():String

return 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');

Events

change

(field, value)

Value of field.


items: [{
  label: 'About',
  type: 'textarea',
  name: 'about',
  emptyText: 'About',
  events: [{
    change: function(){
      
    },
    scope: {}//not required
  }]
...