View Source Backpex.HTML.Form (Backpex v0.1.1)

Contains all Backpex form components.

Summary

Components

Generates form field input errors.

Renders an input.

Renders a searchable multi select.

Components

Generates form field input errors.

Attributes

  • form (:any) (required) - form the error tag should be for.
  • name (:atom) (required) - the name of the field.
  • field_options (:map) (required) - the field options.

Renders an input.

Attributes

  • form (:atom) (required) - the form.
  • field_name (:atom) (required) - the field name.
  • field_options (:atom) (required) - the field options.
  • options (:list) - the options to be used for a select input.
  • value (:any) - the value of the form input.
  • type (:string) (required) - Must be one of "text", "textarea", "toggle", "number", "date", "datetime-local", or "select".
  • Global attributes are accepted.

Renders a searchable multi select.

Attributes

  • prompt (:string) (required) - string that will be shown when no option is selected.
  • not_found_text (:string) (required) - string that will be shown when there are no options.
  • options (:list) (required) - a list of options for the select.
  • search_input (:string) (required) - to prefill and or persist the search term for rerendering.
  • event_target (:any) (required) - the target that handles the events of this component.
  • name (:string) (required) - name of the field the select should be for.
  • field_options (:string) (required) - field options for the corresponding field.
  • form (:any) (required) - form the select should be part of.
  • selected (:list) (required) - the selected values.
  • show_select_all (:boolean) (required) - whether to display the select all button.
  • show_more (:boolean) (required) - whether there are more options to show.
  • search_event (:string) - the event that will be sent when the search input changes. Defaults to "search".

Functions

Link to this function

form_errors?(show_errors, changeset)

View Source