Docs
API
-
Config
-
bbar
-
buttons
- cls
-
defaults
- draggable
-
events
-
footer
- height
- id
- i18n
-
items
-
lang
radio
Radio field type
Example
items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] },{ ...
Properties
column
BooleanPlacing radio elements in column.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] },{ ...
false columns
NumberIt is used only for radio field. It defines number of columns to place radio-s.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', columns: 2, items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' },{ text: 'BMW', value: 'bmw' }] },{ ...
undefined events
ArraySet event handler to field.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }], events: [{ change: function(){ } }] },{ ...
items
ArrayRadio values.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] },{ ...
label
StringText of field.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] },{ ...
labelAlign
StringAlign of label.
Values:
right
,left
,top
.... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }], labelAlign: 'right' },{ ...
left name
StringName of field over which it is possible to get value of field.
... items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] },{ ...
type
StringType of field (value - radio).
{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] }
value
BooleanValue of field.
items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }] ...
Methods
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();
Events
change
(field, value)Value of field.
items: [{ type: 'radio', label: 'Favorite car brand?', name: 'brand', value: 'kia', items: [{ text: 'KIA', value: 'kia' },{ text: 'Honda', value: 'honda' },{ text: 'Land Rover', value: 'lr' },{ text: 'Toyota', value: 'toyota' }], events: [{ change: function(){ }, scope: {}//not required }] ...
-
bbar