PhoenixKitWeb.Components.Core.SimpleForm (phoenix_kit v1.5.1)
View SourceProvides a simple form UI component.
Summary
Functions
Renders a simple form.
Functions
Renders a simple form.
Examples
<.simple_form for={@form} phx-submit="save">
<.input field={@form[:email]} type="email" label="Email"/>
<.input field={@form[:password]} type="password" label="Password" />
<:actions>
<.button>Save</.button>
</:actions>
</.simple_form>Attributes
for(:any) (required) - the datastructure for the form.as(:any) - the server side parameter to collect all input under. Defaults tonil.- Global attributes are accepted. the arbitrary HTML attributes to apply to the form tag. Supports all globals plus:
["autocomplete", "name", "rel", "action", "enctype", "method", "novalidate", "target", "multipart"].
Slots
inner_block(required)actions- the slot for form actions, such as a submit button.