I have a single page application modelled after Hot Towel. In the view, there is a radio button (there can be multiple instances of this radio button). The problem is that when there are multiple rows of this radio button, the user is only able to select one selection within the multiple rows of the radio button. I am not sure how to get it in such a way that, each row contains its unique instance of the radio button. I know the below code is wrong, but it illustrates what I am trying to do-
HTML-
<table style="width: 100%">
<tbody data-bind="foreach: LoanDetails()">
<tr style="border: none">
<td style="font-weight: bold">Doc/Stand By:</td>
<td colspan="3">
<input type="radio" name="DocStandby" value="Documentary" data-bind="checked: DocStandby" /> Documentary
<input type="radio" name="DocStandby" value="Stand By" data-bind="checked: DocStandby" /> Stand By
</td>
</tr>
DATA SERVICE
define(['services/logger', 'durandal/system', 'plugins/router'],
function (logger, system, router) {
var LCApplicationModel = function (SeedID, clientID, DocStandby) {
var self = this;
self.SeedID = SeedID;
self.clientID = clientID;
self.DocStandby = DocStandby;
};
var LCApplication = function (LCObservable, clientID, SeedID) {
var clients = new LCApplicationModel(SeedID(), clientID(), '');
LCObservable.push(clients);
return LCObservable;
};
var dataservice = {
LCApplication: LCApplication
};
return dataservice;
});
In my View model, I call the data service to populate the LoanDetails()-
return LCDataService.LCApplication(LoanDetails, ClientID, nextnum);
How can I make this work?