[javascript] HTML form readonly SELECT tag/input

You should keep the select element disabled but also add another hidden input with the same name and value.

If you reenable your SELECT, you should copy its value to the hidden input in an onchange event and disable (or remove) the hidden input.

Here is a demo:

_x000D_
_x000D_
$('#mainform').submit(function() {_x000D_
    $('#formdata_container').show();_x000D_
    $('#formdata').html($(this).serialize());_x000D_
    return false;_x000D_
});_x000D_
_x000D_
$('#enableselect').click(function() {_x000D_
    $('#mainform input[name=animal]')_x000D_
        .attr("disabled", true);_x000D_
    _x000D_
    $('#animal-select')_x000D_
        .attr('disabled', false)_x000D_
     .attr('name', 'animal');_x000D_
    _x000D_
    $('#enableselect').hide();_x000D_
    return false;_x000D_
});
_x000D_
#formdata_container {_x000D_
    padding: 10px;_x000D_
}
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>_x000D_
<div>_x000D_
    <form id="mainform">_x000D_
        <select id="animal-select" disabled="true">_x000D_
            <option value="cat" selected>Cat</option>_x000D_
            <option value="dog">Dog</option>_x000D_
            <option value="hamster">Hamster</option>_x000D_
        </select>_x000D_
        <input type="hidden" name="animal" value="cat"/>_x000D_
        <button id="enableselect">Enable</button>_x000D_
        _x000D_
        <select name="color">_x000D_
            <option value="blue" selected>Blue</option>_x000D_
            <option value="green">Green</option>_x000D_
            <option value="red">Red</option>_x000D_
        </select>_x000D_
_x000D_
        <input type="submit"/>_x000D_
    </form>_x000D_
</div>_x000D_
_x000D_
<div id="formdata_container" style="display:none">_x000D_
    <div>Submitted data:</div>_x000D_
    <div id="formdata">_x000D_
    </div>_x000D_
</div>
_x000D_
_x000D_
_x000D_