Textbox Autocomplete Element - #textbox_autocomplete {}

The textbox_autocomplete element produces an HTML textbox with built-in autocomplete functionality through the use of server postbacks for selecting and element and typing an element


   #textbox_autocomplete { tag=lookup }


   autocomplete_enter_event(SearchTerm, Tag) ->
      _JsonString = some_search_function(SearchTerm),
   autocomplete_select_event({struct, [{<<"id">>,ID }, {<<"value">>, Value}]}, Tag) ->
      wf:flash(wf:f("Selected ~p:~p",[ID, Value])).  

Core Attributes

Core attributes copied from #textbox{}


  • tag (Erlang Term) :: The tag to be passed to the autocomplete_enter_event and autocomplete_select_event functions.

See Also

View Source or Submit Corrections for this Documentation Page
Copyright © 2008-2024 Nitrogen Web Framework. Released under the MIT License.