P
P
Pavel2015-03-13 01:56:44
Mobile development
Pavel, 2015-03-13 01:56:44

How to autofill form fields?

For example, a visitor has moved from a search to a specific query. Is it possible for the visitor to immediately see the completed form and all related data? (the main goal is for the user not to "fall off" while filling out the form)
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Abramenko, 2015-03-13
@Kortezz

When working with search queries, it is possible to automatically determine the cities of departures and destinations. For this, a special script has been developed , which pulls out the names of cities from the search phrase and returns their IATA code.
For example, for the search phrase "tickets from Moscow to London", the query looks like this:
And the result is like this:

{
  "origin":{
    "iata":"MOW",
    "name":"Москва"
  },
  "destination":{
    "iata":"LON",
    "name":"Лондон"
  }
}

The received IATA and city names are assigned to the appropriate variables in the search form code. As a result, the visitor sees a form with the departure and destination cities already filled in.
Read more about the script here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question