<input type="hidden" name="attachments[]"> $('input:hidden[name=attachments]').val(attachArray); //////////////////////// OR //////////////// <input type="hidden" name="select_day" id="select_day_main"> $('#select_day_main').val(data);