Simple Form

Renders a form component

Login

My description
Attribute Type Documentation Default Value
Required for * :any

The data structure for the form.

as :any

The server side parameter to collect all input under.

title :string

The title of the form.

custom_labels :map

Map of custom label names for error summary

%{}
changeset_label_fn :any

Function to extract a label from nested changesets for display.

actions_layout :string

The layout for actions.

"stacking_cluster"
skip_errors :boolean

Allows to skip error summary

false
rest :global

The arbitrary HTML attributes to apply to the form tag

Required inner_block * :slot
back_button :slot

Slot for back button.

<.input name="email" value="ops@groupcollect.com" label="Email" />

<:back_button><.a href="/">Go back</.a></:back_button>

<:description>My description</:description>

<:actions>
  <.button primary>Submit</.button>
  <.button danger>Cancel</.button>
</:actions>
description :slot

Slot for form description.

<.input name="email" value="ops@groupcollect.com" label="Email" />

<:back_button><.a href="/">Go back</.a></:back_button>

<:description>My description</:description>

<:actions>
  <.button primary>Submit</.button>
  <.button danger>Cancel</.button>
</:actions>
actions :slot

Slot for form actions.

<.input name="email" value="ops@groupcollect.com" label="Email" />

<:back_button><.a href="/">Go back</.a></:back_button>

<:description>My description</:description>

<:actions>
  <.button primary>Submit</.button>
  <.button danger>Cancel</.button>
</:actions>
fieldset :slot

Slot for fieldsets.

hide_legend :slot
Show slot attributes Hide slot attributes
legend :string

Fieldset title (legend)