Build type-safe composable forms in Elm
Success
variant to Form.View.State
. By default, it can be styled using the .elm-form-success
CSS selector. #26
Form.disable
and Form.Base.disable
, which allow disabling the fields of a form. #27
Form.Base.FilledField
has been renamed to Form.Base.CustomField
and its field
property has been renamed to state
. #27
( field, Maybe Error )
is replaced with the new record Form.Base.FilledField
everywhere. #27
error : values -> Maybe String
attribute was added to field configuration. Useful to show server-side validation errors. #29
Error
type was extended with an External
variant. It is meant to represent an external error not caused by client-side validation. #29
NumberField
value storage has been changed from Maybe Float
to String
to fix issues entering values after the decimal point. #25 & #30
step
item in the Form.Base.NumberField.Attributes
record has been changed from number
to Maybe number
to allow a step attribute of "any"
. #30
Form.View
now listens to the change
event instead of input
. Internet Explorer and Edge now should work properly with this field. #28
Form.View.htmlViewConfig
, which allows easy customization of the default Form.View.asHtml
function. #23
label
for accessibility in Form.View.asHtml
. The previous label
elements are now div
elements with the elm-form-label
class. To migrate, replace your old CSS rules .elm-form label { ... }
with .elm-form .elm-form-label { ... }
.Form.Value
. Elm 0.19 makes this module unnecessary! The API is simpler now, allowing you to work with your types directly. To migrate, replace Value a
with a
and initialize your form values explicitly.