Surface.Components.Form (surface v0.1.0) View Source
Defines a form that lets the user submit information.
Provides a wrapper for Phoenix.HTML.Form.form_for/3
. Additionally,
adds the form instance that is returned by form_for/3
into the context,
making it available to any child input.
All options passed via opts
will be sent to form_for/3
, for
and action
can be set directly and will override anything in opts
.
Properties
- for :any, required: true - Atom or changeset to inform the form data.
- action :string, default: "#" - URL to where the form is submitted.
- opts :keyword, default: [] - Keyword list with options to be passed down to
form_for/3
. - change :event - Triggered when the form is changed.
- submit :event - Triggered when the form is submitted.
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Link to this section Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.