Answer the question
In order to leave comments, you need to log in
How can I get data from db in ajax in smarty template?
hello i have such loop in smarty template
<select name="qs_category" id="qs_category">
<option value="">Категория</option>
{foreach from=$categories item=v name=cat}
<option value="{$v.id}" >{$v.str}{$v.name}</option>
{/foreach}
</select>
Answer the question
In order to leave comments, you need to log in
I will describe in general terms, because otherwise you need to reproduce the entire project:
1) Call the future input for autocompletion some kind of ID, for example.
<input id="first-level-category-autocomplete" type="text">
[{label:"label1", value: "value1"},{label:"labelN", value: "valueN"}]
. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question