runlevelsix / autoform-switchery

Custom Switchery Boolean Input for AutoForm (Meteor)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mayankchhabra:autoform-switchery

An add-on Meteor package for aldeed:autoform. Provides a single custom input type for Boolean values, "switchery", which renders using the switchery plugin.

Prerequisites

AutoForm

In a Meteor app directory, enter:

$ meteor add aldeed:autoform

Installation

In a Meteor app directory, enter:

$ meteor add mayankchhabra:autoform-switchery

Usage

Specify "switchery" for the type attribute of a Boolean input. This can be done in a number of ways:

In the schema, which will then work with a quickForm or afQuickFields:

{
  approve: {
    type: Boolean,
    autoform: {
      type: "switchery"
    }
  }
}

Contributing

Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.

About

Custom Switchery Boolean Input for AutoForm (Meteor)

License:MIT License


Languages

Language:JavaScript 88.9%Language:HTML 11.1%