inputgrouping
v1.1.13
Published
Easily create a group of checkboxes or radio buttons given a list or array.
Downloads
4
Maintainers
Readme
inputGrouping
Easily create a group of checkboxes or radio buttons given a list or array.
#How to use
$('#test1').inputGrouping({
listData: '["Checkbox Item 1","Checkbox Item 2"]',
fieldType: 'Checkbox',
vertAligned: false,
fieldSeperator: ', '
});
#API
#set - Update data of group
$('#test1').inputGrouping('set', '["New Radio Item 1","New Radio Item 2"]');
#get - Get currently selected fields as string
var selVal = $('#test1').inputGrouping('get');
#Options
#listData Set the fields that are to be selectable,currently available:
- Javascript object
- JSON string
- String seperated with return
#fieldType Currently only two options; Radio and Checkbox
#vertAligned Set to true if want options to be stacked. Default is to position horizontally
#fieldSeperator Used to seperate multiple selections. Default is ' | '