View Source PetalComponents.Form (petal_components v1.5.1)

Everything related to forms: inputs, labels etc

Deprecated in favor of field.ex and input.ex, which use the new %Phoenix.HTML.FormField{} struct.

Summary

Functions

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • layout (:atom) - layout for the checkboxes. Defaults to :col.
  • checked (:list) - a list of checked values.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Use this when you want to include the label and some margin.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".

Attributes

  • class (:string) - extra classes for the help text. Defaults to "".
  • help_text (:string) - context/help for your field. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - CSS classes to add to your label.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • value (:any) - the radio value. Defaults to nil.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • layout (:atom) - layout for the radio options. Defaults to :col.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Functions

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • layout (:atom) - layout for the checkboxes. Defaults to :col.
  • checked (:list) - a list of checked values.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.
Link to this function

datetime_local_input(assigns)

View Source

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.
Link to this function

datetime_select(assigns)

View Source

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Use this when you want to include the label and some margin.

Attributes

  • form (:any) (required) - the form object.
  • field (:atom) (required) - field in changeset / form.
  • label (:string) - labels your field.
  • label_class (:string) - extra CSS for your label. Defaults to nil.
  • help_text (:string) - context/help for your field. Defaults to nil.
  • type (:string) - The type of input. Defaults to "text_input".
  • wrapper_classes (:string) - CSS class for wrapper. Defaults to "pc-form-field-wrapper".
  • Global attributes are accepted.
Link to this function

form_field_error(assigns)

View Source

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".

Attributes

  • class (:string) - extra classes for the help text. Defaults to "".
  • help_text (:string) - context/help for your field. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - CSS classes to add to your label.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • value (:any) - the radio value. Defaults to nil.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • layout (:atom) - layout for the radio options. Defaults to :col.
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • options (:list) - options for the select. Defaults to [].
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.
Link to this function

telephone_input(assigns)

View Source

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.

Attributes

  • form (:any) - . Defaults to nil.
  • field (:atom) - . Defaults to nil.
  • label (:string) - labels your field. Defaults to nil.
  • class (:string) - extra classes for the text input. Defaults to "".
  • Global attributes are accepted.