An add-on Meteor package for aldeed:autoform. Provides a single custom input type, "bootstrap-colorpicker", which renders an input using the bootstrap-colorpicker plugin.
Heavily inspired by the aldeed:autoform-bs-datepicker package.
Bootstrap and Autoform must be installed separately.
In a Meteor app directory, enter:
$ meteor add twbs:bootstrap
$ meteor add aldeed:autoform
In a Meteor app directory, enter:
$ meteor add michalvalasek:autoform-bootstrap-colorpicker
Specify "bootstrap-colorpicker" for the type
attribute of any input. This can be done in a number of ways:
In the schema, which will then work with a quickForm
or afQuickFields
:
{
color: {
type: String,
autoform: {
type: "bootstrap-colorpicker"
}
}
}
Or on the afFieldInput
component or any component that passes along attributes to afFieldInput
:
{{> afQuickField name="typeTest" type="bootstrap-colorpicker"}}
{{> afFormGroup name="typeTest" type="bootstrap-colorpicker"}}
{{> afFieldInput name="typeTest" type="bootstrap-colorpicker"}}
Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.