There are two input to which the datalist attached:

 <input list="curr-name-list" type="text" name="iso_name" class="form-control" id="iso-name" placeholder="Euro*" title="Type here international name of currency" required> <datalist id="curr-name-list"> {% for currency in currencies %} <option data-iso-id ="{{ currency.iso_id }}" value="{{ currency.name}}">{{ currency.name}}</option> {% endfor %} </datalist> 

The construct {% something %} and {{ another_something }} is the jinja syntax.
A list with the names of currencies is attached to this input (for example, Euro , US Dollar etc.) For each option I give a data attribute with an iso currency number. Similar design with the second input:

 <input list="iso-code-list" type="text" class="form-control" name="iso_code" id="iso-code" placeholder="EUR*" title="Type here ISO code" required> <datalist id="iso-code-list"> {% for currency in currencies %} <option data-iso-id ="{{ currency.iso_id }}" value="{{ currency.iso_code}}">{{ currency.iso_code}}</option> {% endfor %} </datalist> 

So, after rendering, I have two inputs, each with a datalist attached. The essence of the question: how when filling in one input, insert the appropriate value in the second? It is not necessary to operate on data-iso-id , so let's say, my sketch. Thanks in advance for your help.

    0