Corex.HiddenInput (Corex v0.1.0-alpha.33)

View Source

Hidden input component based on Phoenix Core Components.

Examples

Basic

<.hidden_input id="id" name="user[id]" value={@user.id} />

With form field

<.hidden_input field={@form[:id]} />

Summary

Components

hidden_input(assigns)

Attributes

  • id (:string) - The id of the hidden input.
  • name (:string) - The name attribute for form submission.
  • value (:any) - The value of the hidden input. Defaults to nil.
  • form (:string) - The id of the form this input belongs to.
  • field (Phoenix.HTML.FormField) - A form field struct from the form, e.g. @form[:id].
  • Global attributes are accepted.