Hello I would like to do create a simpledropdownlist, we are using MVC architecture with SQL server. On frontend side, we are using typescript with knockout.
I need to do adjustment to existing form. The adjustment is very simple. I need to add dropdown list with 3 values - "Not chosen", "Yes", "No".
The property in model is of type bool?. Initial value should be "Not chosen" and if user saves the form with this value "null" should be saved to the DB.
I made this:
<select id="selectForTaxPurposes"
data-bind="booleanValue: $data.model.forTaxPurposes,
<option id="nothing" value="null">Choose</option>
<option id="yes" value="true">Yes</option>
<option id="no" value="false">Ne</option>
</select>¨
But the form won't even load. Does anybody have any advise on this? I found couple of solutions, but they are very complicated for this case