Docs
API
  • password

    Password field type

    Example

    
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
    ...
    

    Properties

    cls

    String

    The CSS class that will be added to field.
    It is used for custom styling field.

    
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password',
      cls: 'field-age'
    },{
    ...
    }]
    

    emptyText

    String

    Placeholder text.

    
    ...
    items: [{
      label: 'Pass',
      emptyText: 'Pass',
      name: 'pass',
      type: 'password'
    },{
    ...
    

    events

    Array

    Set event handler to field.

    
    ...
    items: [{
      label: 'Pass',
      emptyText: 'Pass',
      name: 'pass',
      type: 'password'
      events: [{
        change: function(){
          
        }
      }]
    },{
    ...
    

    inputHeight

    Number

    Field input height. It influence only on fields with input element inside.

    
    ...
    items: [{
      label: 'Pass',
      type: 'password',
      inputHeight: 35
    },{
    ...
    

    label

    String

    Text of field.

    
    ...
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
    },{
    ...
    

    labelAlign

    String

    Align of label.

    Values: right, left, top.

    
    ...
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
    },{
    ...
    
    left

    name

    String

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

    
    ...
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
    },{
    ...
    

    showPassTip

    Boolean

    Special right side element to show/hide password.

    
    {
      label: 'Pass',
      name: 'pass',
      showPassTip: true,
      type: 'password'
    }
    
    false

    type

    String

    Type of field (value - number).

    
    {
      label: 'Pass',
      name: 'pass',
      type: 'password'
    }
    

    value

    Mixed

    Value of field.

    
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
    ...
    

    Methods

    blur

    ()

    Blur field.

    
    field.blur();
    

    clear

    ()

    Clear value.

    
    tbar: [{
      type: 'number',
      id: 'employee',
      value: 1
    },{
    ...
    }] 
    
    ...
    var numberField = Fancy.getWidget('employee');
    
    numberField.clear();
    

    disable

    ()

    Disable field.

    
    field.disable();
    

    enable

    ()

    Enable field.

    
    field.enable();
    

    focus

    ()

    Focus field.

    
    field.focus();
    

    get

    ():String

    return value of field.

    
    tbar: [{
      type: 'password',
      id: 'pass'
    },{
    ...
    }] 
    
    ...
    var field = Fancy.getWidget('pass');
    
    field.get();
    

    set

    (value: String)

    Set value of field.

    
    tbar: [{
      type: 'password',
      id: 'pass'
    },{
    ...
    }] 
    
    ...
    var field = Fancy.getWidget('pass');
    
    field.set('password');
    

    setWidth

    (value: Number)

    Set new field width.

    
    field.setWidth(400);
    

    Events

    blur

    (field)

    Losing focus from field event.

    
    items: [{
      type: 'date',
      label: 'Birthday',
      name: 'birthday',
      events: [{
        blur: function(){
          
        }
      }]
    ...
    

    change

    (field, value)

    Change field value event.

    
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
      events: [{
        change: function(){
          
        },
        scope: {}//not required
      }]
    ...
    

    focus

    (field)

    Focus field event.

    
    items: [{
      label: 'Pass',
      name: 'pass',
      type: 'password'
      events: [{
        focus: function(){
          
        }
      }]
    ...