{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:48Z","object_id":{"id":1303,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_wires","title":"mod_wires","uri":"https:\/\/zotonic.com\/id\/1303"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"references":{"objects":[{"created":"2020-05-30T05:47:48Z","object_id":{"id":1279,"is_a":["text","documentation"],"name":"doc_glossary","title":"Glossary","uri":"https:\/\/zotonic.com\/id\/1279"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"subject":{"objects":[{"created":"2026-09-09T13:48:17Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:17Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:17Z","object_id":{"id":2586,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_search_and_discovery","title":"Search and discovery","uri":"https:\/\/zotonic.com\/id\/2586"},"seq":3},{"created":"2026-09-09T13:48:17Z","object_id":{"id":2624,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_wire_action","title":"Wire action","uri":"https:\/\/zotonic.com\/id\/2624"},"seq":4},{"created":"2026-09-09T13:48:17Z","object_id":{"id":2643,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_query","title":"Query","uri":"https:\/\/zotonic.com\/id\/2643"},"seq":5},{"created":"2026-09-09T13:48:17Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1985,"is_a":["text","documentation","reference","template_action"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1985"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_action_action_typeselect","page_url":{"en":"https:\/\/zotonic.com\/docs\/1985\/typeselect","x-default":"https:\/\/zotonic.com\/docs\/1985\/typeselect"},"preview_url":null,"resource":{"version":4047,"pivot_location_lat":null,"title":"typeselect","is_authoritative":true,"body":"<p>Show possible selections whilst typing.<\/p>\n<p>Performs a search for the typed text whilst typing in an input field. Shows possible matching pages in a selectable list.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">&lt;form method=&quot;get&quot; action=&quot;\/search&quot;&gt;\n  &lt;input type=&quot;search&quot; id=&quot;person&quot; name=&quot;person&quot; value=&quot;&quot; \/&gt;\n  &lt;ul id=&quot;suggestions&quot;&gt;&lt;\/ul&gt;\n  &lt;input type=&quot;hidden&quot; id=&quot;person_id&quot; value=&quot;&quot; \/&gt;\n  {% wire id=&quot;person&quot; type=&quot;input&quot;\n          action={typeselect cat=&quot;person&quot;\n                             target=&quot;suggestions&quot;\n                             action_with_id={with_args action={set_value target=&quot;person_id&quot;} arg={value select_id}}\n                             action={submit}}\n  %}\n&lt;\/form&gt;\n<\/code><\/pre>\n<p>This is a rather complicated example. It connects the typeahead action to the input element. The list of suggestions\nwill be shown in the &lt;ul\/&gt; with id suggestions. Only pages in the category person will be found.<\/p>\n<p>The listed suggestions will have two actions attached. One action will set the value of the hidden input element\nperson_id to the id of the selected suggestion (which is a <a href=\"\/id\/doc_glossary#term-page\">page<\/a>). The other action will\nsubmit the form.<\/p>\n<p>The action_with_id arguments are always performed before the action arguments.<\/p>\n<p>The typeselect action accepts the following arguments:<\/p>\n<table class=\"table\"><thead><tr><th>Argument<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>target<\/td><td>The id of element that will show the list of suggestions.<\/td><td><code>target=&quot;mylist&quot;<\/code><\/td><\/tr><tr><td>cat<\/td><td>The category for the searched pages. This argument can be repeated.<\/td><td><code>cat=&quot;text&quot;<\/code><\/td><\/tr><tr><td>template<\/td><td>Template used to show the list of possible pages. This defaults to the template <code>&quot;_action_typeselect_result.tpl&quot;<\/code>. The template gets the following arguments: <code>result<\/code> (list of ids), <code>action_with_id<\/code> and <code>action<\/code>.<\/td><td><code>template=&quot;_show_suggestions.tpl&quot;<\/code><\/td><\/tr><tr><td>action_with_id<\/td><td>Actions executed when a suggestion is selected. The id of the selected page will be added as the <code>id<\/code> parameter. This argument can be repeated.<\/td><td><code>action_with_id={postback postback=&quot;page_select&quot;}<\/code><\/td><\/tr><tr><td>action<\/td><td>Actions executed when a suggestion is selected. This list is executed after the <code>action_with_id<\/code> actions. This argument can be repeated.<\/td><td><code>action={slide_up target=&quot;form-id&quot;}<\/code><\/td><\/tr><\/tbody><\/table>","slug":"typeselect","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"7cf6a45b40af34c477b1ccbc68f6f2768642fc0b3426e5cf03e6809a4fb13d2e","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":326,"is_a":["meta","category"],"name":"template_action","title":"Actions","uri":"https:\/\/test.zotonic.com\/id\/326"},"doc_source_path":"apps\/zotonic_mod_wires\/src\/actions\/action_wires_typeselect.erl","publication_start":"2023-06-24T08:17:45Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_wires\/src\/actions\/action_wires_typeselect.erl","pivot_location_lng":null,"doc_source_kind":"action","name":"doc_template_action_action_typeselect","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:48Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_wires","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"28493fb676b2d92727e68d4fba20d89c56cf8ead\n","erlang_module":"action_wires_typeselect","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-15T20:07:42Z","title_slug":"typeselect"},"uri":"https:\/\/zotonic.com\/id\/1985","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1985"}},"status":"ok"}