button

Button field type

Example


items: [{
...
},{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
},{
...

Properties

events

Array

Set event handler to field.


...
items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
  events: [{
    click: function(){
      
    }
  }]
},{
...

handler

Function

Fires on field button click.


...
items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true,
  handler: function(){
    
  }
},{
...

label

String

Text of field.


...
items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
},{
...

labelAlign

String

Align of label.

Values: right, left, top.


...
items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
  labelAlign: 'right'
},{
...
left

name

String

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


...
items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
},{
...

type

String

Type of field (value - button).


{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
}

Events

click

(field)

Field button click.


items: [{
  label: 'Label',
  type: 'button',
  name: 'button',
  buttonText: true
  events: [{
    click: function(){
      
    },
    scope: {}//not required
  }]
...