I saw this question about KO binding and MVC and it has me concerned. The question is long and I don't know if it applies to what I am trying to do.
I have an input:
<input
id="Item_ReqestedItem_ItemNumber"
type="text" value="" name="Item.ReqestedItem.ItemNumber"
data-bind="value: ItemNumberItem, disable: ItemNumberItem.isServerSet"
disabled="">
If I manually type a value into this field and POST, the value is passed to the Controller/Action. If I let KO populate this data then the value at POST shows null.
What is the minimum work required to get this value to POST when I use Knockout values?
- I am not using ko.editable. Do I need it?
- I am not doing anything to support this relationship between MVC and KO in document ready. Do I need to in order to accomplish this simple task?
Update
The comments are correct. It is the disable attribute that is causing the value to be null. The easy fix is to use readonly. I still do not have a fix for this issue. Getting rid of disabled is not an option. I do not see how I can switch to readonly without tossing out the KO framework. How can I get the disabled data back to the server? I'd prefer to fix this with KO as I have to manage about 30 inputs.