S
S
Sergey2016-10-25 11:50:29
CMS
Sergey, 2016-10-25 11:50:29

How to load values ​​on form input?

In the form, the address must be made only from valid values ​​(streets of the same district).

I'm considering the option to load streets from the list when entering - how to implement this in general?

The idea was spied on many sites where the name of the city is loaded in this way when entering your location.

In particular, the Wordpress + Woocommerce bundle is used, but there is also a way without being tied to the engine.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Ruzhevich, 2016-10-25
@ruzhevich

Once I created this on the basis of the database and displayed it with ajax when entering, if the database is satisfied, then I will look for the code

D
Dmitry Verkhoumov, 2016-10-25
@DVerkh

If there are not very many streets, use AJAX in conjunction with any database, as Alexander Ruzhevich said . If there are many streets, then look for WordPress + Sphinx bundle solutions (for example, WordPress Sphinx Search Plugin). Now I checked, there are even articles on Habré.
By the way, if there are very few streets (up to 100), then I would generally upload the list to JS and use it further.

D
dorado, 2017-03-06
@dorado

If there are many or few streets, use the dadat service, it is generally good for autocomplete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question