As in Yandex.Cards to make multiple SuggestView?

Good afternoon.
Must visit to make a few input type="text" that is added by JQuery to the introduction of address points on the map:

<div class="address_section">
 <div id="inputlar">
 <p class="first_element"><span></span><input type="text" value placeholder="City, street, building, structure, body" id="pac-input1" name="pac-input1" data-count="1" class="controlsInput"><em class="clear_first">×</em></p><div class="my-suggest-container"></div><p></p>
 <a href="#" class="new_address_btn">Add address</a>
 <div id="map_canvas"></div>

When typing the address in(!) input should appear in the tooltip for that particular input


function init () {
 var myMap = new ymaps.Map('map_canvas', {
 center: [51.1480773, 71.4562873],
 zoom: 9,
 behaviors: ['scrollZoom', 'drag'],
 controls: ['zoomControl', 'typeSelector', 'rulerControl']


function onLoad (ymaps) {
 var inputs = document.getElementsByClassName("controlsInput");
 var suggestView;
 for (var i = 1; i < inputs.length+1; i++) { //Start of problem area
// Next only works for the first input with ID=pac-input1
 suggestView = new ymaps.SuggestView('pac-input'+i, {
 boundedBy: [[40.817717596787695, 45.810683499999996], [54.95398155782081, 87.99818349999998]]
});'select', function(e){

 var cnt = 1;
 var count = parseInt($('.address_section p').length);

 if (count < 10) {
 // count=count+1;
 $("#inputlar").append("<p class="second_address"><span>" + count + "</span><input id="pac-input" + count + "" class="controlsInput" type="text" placeholder="City, street, building, structure, building" data-count="" + cnt +""><em class="addr_remove">×</em></p>");
 $('.address_section p:first-child span').text('1').css('opacity', '1');
 var newInput = [];
 var newEl = document.getElementById('pac-input' + count);
 } else {
 $(this).before('<p class="alert">Too many addresses.</p>');

In the description SuggestView from Yandex to element see "HTML element or id." But if I have a few items?

The second question is how the data received from each input (when selected the prompt'select') or blur from the input) to send to the geocoder and put a mark on the map?
July 4th 19 at 22:44
0 answer

Find more questions by tags JavaScriptjQuery