Skip to content

ecarlotti/meteor-autoform-duallistbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meteor-autoform-duallistbox

Adds the ability to use a transfer select to Autoform. It uses the Bootstrap Dual Listbox library.

Originally forked from AutoForm Select Transfer. The fork was done to update the bootstrap dual list box component to its latest version and also to add compatibility with some missing AutoForm settings, like the default "disabled" state which is not present by defaut in the bootstrapDualListBox component.

Install

To install the package run the following command:

meteor add ecarlotti:autoform-duallistbox

Usage

{{> afQuickField name='myOption' class='input-sm' type='duallistbox' multiple='true' options=selectOptions bootstrapDualListboxOptions=bootstrapDualListBoxOptions}}
Template.x.helpers({
  selectOptions: function() {
    return [
     { label: 'Some label', value: 'Some value'},
     { label: 'Some label 2', value: 'Some value2'},
     ...
    ];
  },
  bootstrapDualListBoxOptions: function() {
    return {
      moveOnSelect: false,
      moveOnDoubleClick: true,
      preserveSelectionOnMove: false,
      showFilterInputs: true,
      nonSelectedFilter: '',
      selectedFilter: '',
      btnClass: 'btn-default'
    };
  }
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.7%
  • HTML 1.3%