I have two pages with HTML forms. The first page has a submission form, and the second page has an acknowledgement form. The first form offers a choice of many controls, whi
This is an ideal solution for disabling all inputs, textareas, selects and buttons in a specified element.
For jQuery 1.6 and above:
// To fully disable elements
$('#myForm :input').prop('disabled', true);
Or
// To make elements readonly
$('#myForm :input').prop('readonly', true);
jQuery 1.5 and below:
$('#myForm :input').prop('disabled', 'disabled');
And
$('#myForm :input').prop('readonly', 'readonly');