ember-light-form
This addon provides a flexible framework to manage form states and validations. It allows to use any form control component (e.g. one-way-controls, ember-power-select,...) .
Install
ember install ember-light-form
Example
Built-in controls
Built-in controls rely on ember-one-way-controls.
The available controls are:
-
f.checkbox
(doc) -
f.color
(doc) -
f.date
(doc) -
f.datetime
(doc) -
f.email
(doc) -
f.file
(doc) -
f.hidden
(doc) -
f.input
(doc) -
f.month
(doc) -
f.number
(doc) -
f.password
(doc) -
f.radio
(doc) -
f.range
(doc) -
f.search
(doc) -
f.select
(doc) -
f.tel
(doc) -
f.text
(doc) -
f.textarea
(doc) -
f.time
(doc) -
f.url
(doc) -
f.week
(doc)
Custom controls
You can use any plug-in control and bind them to ember-light-form fields as illustrated below:
The available attributes are:
-
field.value
: the value of the field attribute (hereauthor
) -
field.controlId
: the id of the control (match the labelfor
attribute) -
field.errors
: the errors of the field attribute -
field.update
: the action that updates of the field attribute (hereauthor
)