Disabled fields do not pass thru POST
, you are doing:
$('.adminOnlyField').attr("readonly","true");
which makes it readonly
, and it can pass thru POST
, but at end you disable the same field again by doing:
$('.adminOnlyField').prop('disabled', 'disabled');
this line makes it disabled
due to which it does not get POST
'ed. So if you want to make it pass thru POST
, make it readonly
, and remove the following line:
$('.adminOnlyField').prop('disabled', 'disabled');