inputgrouping

1.1.13 • Public • Published

DEMO Link

GitHub Link

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 ' | '

Package Sidebar

Install

npm i inputgrouping

Weekly Downloads

1

Version

1.1.13

License

none

Last publish

Collaborators

  • danhol86