defmodule PhoenixFormAwesomplete do alias PhoenixFormAwesomplete.GenJS alias Phoenix.HTML alias Phoenix.HTML.Form @moduledoc ~S''' PhoenixFormAwesomplete is a [Phoenix function component](https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html) that utilizes Lea Verou's autocomplete / autosuggest / typeahead / inputsearch [Awesomplete widget](https://leaverou.github.io/awesomplete/index.html), complying to accessibility standards (WCAG 2, Section 508). It comes with an AwesompleteUtil [javascript library](https://nico-amsterdam.github.io/awesomplete-util/index.html) which adds the following features: - Dynamic remote data loading; based on what is typed-in it performs an ajax lookup. - Allow HTML markup in the shown items. Show value with description. Optionally search in the description text. - Show when there is an exact match. - Show when there isn't a match. - When there is an exact match show related data (supplied in the remote data) in other parts of the page. - Select the highlighted item with the tab-key. [Online demo](https://nico-amsterdam.github.io/awesomplete-util/phoenix.html) ## Use cases An autocomplete component is a free text input that provides suggestions while typing. It is not necessary to choose one of the suggestions, but of course a form validator can reject disallowed input. The HTML combobox is very suitable for this. The combobox looks like a or element combined with a with