Simple Form

Renders a form component

Form with fieldsets

There's a problem

    Fieldset 1
    Fieldset 2
    Fieldset 3
    Attribute Type Documentation Default Value
    id :string
    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.

    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.

    <:back_button><.a href="/">Go back</.a></:back_button>
    
    <:fieldset legend="Fieldset 1">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 2">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 3" hide_legend>
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:actions>
      <.button primary>Submit</.button>
      <.button secondary>Cancel</.button>
    </:actions>
    description :slot

    Slot for form description.

    header :slot

    Slot for form header.

    actions :slot

    Slot for form actions.

    <:back_button><.a href="/">Go back</.a></:back_button>
    
    <:fieldset legend="Fieldset 1">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 2">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 3" hide_legend>
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:actions>
      <.button primary>Submit</.button>
      <.button secondary>Cancel</.button>
    </:actions>
    message :slot

    Slot for form message.

    Show slot attributes Hide slot attributes
    message :any

    The message content. Can be a string, or a tuple of {kind, message} or {kind, icon, message} to specify the kind and icon inline.

    kind :atom
    icon :string
    link_text :string
    link_href :string
    fieldset :slot

    Slot for fieldsets.

    Show slot attributes Hide slot attributes
    legend :string

    Fieldset title (legend)

    hide_legend :boolean

    Hides the legend.

    bare :boolean

    Renders the slot’s content directly, without wrapping it in a <fieldset>/<legend>. Use for content that already provides its own fieldset semantics (e.g. an input of type="radiogroup") so it still takes part in the form’s between-section spacing without nesting fieldsets. When set, legend is ignored.

    <:back_button><.a href="/">Go back</.a></:back_button>
    
    <:fieldset legend="Fieldset 1">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 2">
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:fieldset legend="Fieldset 3" hide_legend>
      <.input id="user_name" name="name" value="Ops User" label="Name" />
      <.input id="user_email" name="email" value="ops@groupcollect.com" label="Email" />
    </:fieldset>
    
    <:actions>
      <.button primary>Submit</.button>
      <.button secondary>Cancel</.button>
    </:actions>