Hello! There is a code that dynamically outputs input :

 var inputA = $('<input/>', { type: 'text', name: 'answer', placeholder: 'Ответ', value: '', class: 'form-control', id:'answer', style: 'margin-top: 5px; margin-bottom: 15px' }).appendTo(div); } 

It is necessary instead of input output select with values ​​from the database. Code written for example

    1 answer 1

    Not much will differ from how you add input .

    Only that it will be necessary to sort "values ​​from a DB".

    For example:

     var data = { "1": "Раз", "2": "Два", "3": "Три" }; // Данные "из бд" $('<select>').appendTo('div'); // Создаём пустой select $.each(data, function(key, value) { // перебираем даные и создаём option $('select').append($("<option></option>").attr("value", key).text(value)); }); 
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script> <div></div>