Chuck any struct with serde support in use_form and automatic two-way binding will be set up. via form.bind(key) .
With optional validation and soon nested form support.
The initial draft used form.input(key) to create the full input![]Node<Msg> however this makes it harder to mix in things like custom styles it also meant that a new function had to be created for each input type, therefore form.bind is used to set up the Attr EventHandler and additional class names such as "data-validation-errror" etc.
As before let me know what you think of the api surface.
Second draft of forms support.
Chuck any struct with serde support in use_form and automatic two-way binding will be set up. via
form.bind(key)
.With optional validation and soon nested form support.
The initial draft used
form.input(key)
to create the fullinput![]
Node<Msg>
however this makes it harder to mix in things like custom styles it also meant that a new function had to be created for each input type, thereforeform.bind
is used to set up the Attr EventHandler and additional class names such as "data-validation-errror" etc.As before let me know what you think of the api surface.
Simple form:
Form with validaiton: