So I write down the value of the inpatu using jQuery and visually it is written (the required value appears in the field), only the form says that it is empty. Because of what is not sent.
var arr = [{ value: 6, list: [{ value: 0, text: 'A3' }, { value: 1, text: 'A4' }, { value: 2, text: 'A5' } ] }, { value: 7, list: [{ value: 0, text: 'M3' }, { value: 1, text: 'M6' }, { value: 2, text: 'X5' }, { value: 3, text: 'X6' } ] }, ]; $("#category").change(function() { selval = $(this).val(); forval = arr[selval - 6].list; $("#selectmodel").empty(); $.each(forval, function(i, val) { $("#selectmodel").append("<option value='" + val.text + "'>" + val.text + "</option>"); }) }); $("#selectmodel").change(function() { text = $(this).val(); $("#xf_model").val(text); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <select id="category"> <option value="6">значение 6</option> <option value="7">значение 7</option> </select> <select id="selectmodel"> </select> <input type="text" name="xfield[model]" id="xf_model" value="" rel="essential" data-rel="links" />