Answer the question
In order to leave comments, you need to log in
How to display the city by the first letter in smarti?
hello, please tell me a simple option to display from the database to the input in the smart city template? more precisely, when entering the first letters, suitable options to show, maybe someone has a short ready-made example?
Answer the question
In order to leave comments, you need to log in
There is no such solution for Smarty. We need a script that will receive data from the backend via AJAX and display it to the user.
If the list of cities is known in advance, you can display them all in the template, and then display them using JavaScript.
The implementation of both is complete on the web: https://www.w3schools.com/php/php_ajax_livesearch.asp
https://codepen.io/shahjehan/pen/NGWaKq
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question