PhoenixFormAwesomplete.EmbedScriptComponent (PhoenixFormAwesomplete v1.0.2)

View Source

Provides function components for the Awesomplete script generator component, to embed autocomplete functionality in the HTML pages. Can only be used outside LiveView.

Summary

Functions

Wrapper for PhoenixFormAwesomplete.awesomplete_script.

Wrapper for PhoenixFormAwesomplete.copy_value_to_field.

Wrapper for PhoenixFormAwesomplete.copy_value_to_id.

Functions

autocomplete(assigns)

Wrapper for PhoenixFormAwesomplete.awesomplete_script.

Attributes

  • forField (:any) (required) - Phoenix.HTML.FormField struct or field name.
  • forForm (:any) - Phoenix.HTML.Form struct or form name. Not needed when FormField is used. Defaults to nil.
  • Global attributes are accepted. the options for awesomplete_script. Supports all globals plus: ["ajax", "assign", "autoFirst", "combobox", "container", "convertInput", "convertResponse", "data", "debounce", "descr", "descrSearch", "filter", "id", "item", "label", "list", "listLabel", "loadall", "limit", "maxItems", "minChars", "multiple", "prepop", "replace", "sort", "statusNoResults", "statusTypeXChar", "statusXResults", "type", "url", "urlEnd", "value"].

copy_value_to_field(assigns)

Wrapper for PhoenixFormAwesomplete.copy_value_to_field.

Attributes

  • sourceField (Phoenix.HTML.FormField) (required) - a Phoenix.HTML.FormField struct retrieved from the form, for example: @f[:country].
  • targetField (Phoenix.HTML.FormField) (required) - a Phoenix.HTML.FormField struct retrieved from the form, for example: @f[:capital].
  • dataField (:string) - Optional, dataField to be copied, for example: capital. Defaults to nil.
  • Global attributes are accepted. script attributes.

copy_value_to_id(assigns)

Wrapper for PhoenixFormAwesomplete.copy_value_to_id.

Attributes

  • field (:any) (required) - Phoenix.HTML.FormField struct or field name.
  • form (:any) - Phoenix.HTML.Form struct or form name. Not needed when FormField is used. Defaults to nil.
  • dataField (:string) - Optional, dataField to be copied, for example: capital. Defaults to nil.
  • target (:string) - css selector, for example: #capital.
  • Global attributes are accepted. script attributes.