ALF Forms
- There are three types of forms: without a form class,
.std
and.simple
(see examples below). - Additional classes can be added to the form:
.inline-errors
: used to mark individual rows with errors or warnings. See examples in the tabs below..full-width-controls: used to make controls use all the available space. This is the default behaviour for phone resolutions, but you can apply it to all resolutions by using this class.
.std-controls-phone
: by default, at phone resolutions the controls will use all the available space. Use this class to disable this behaviour.
- To add focus, use HTML5's native
autofocus
. - To disable a field, use the
disabled
attribute and the.disabled
class.
Without a form class, a form has no layout, though it will be styled. This might not be especially useful, unless you want to layout the form yourself from scratch.
In .std
forms, the labels float on the left. They are responsive, phone-down.
In .simple forms
, the labels are above the fields. They are responsive by nature.