code:
for (var x = 0; x < inputs.length; x++) {
var input = inputs[x];
if (input && input.name == 'identifier' && input.type == 'text') {
input.name = 'identifiers[' + index + '].identifier';
}
else if (input && input.name == 'preferred' && input.type == 'radio') {
input.name = 'identifiers[' + index + '].preferred';
input.id = 'identifiers[' + index + '].preferred';
}
var input = inputs[x];
if (input && input.name == 'identifier' && input.type == 'text') {
input.name = 'identifiers[' + index + '].identifier';
}
else if (input && input.name == 'preferred' && input.type == 'radio') {
input.name = 'identifiers[' + index + '].preferred';
input.id = 'identifiers[' + index + '].preferred';
}
I suppose that a loop can be added to test if the user has not clicked the preferred check box and has more than one identifier and If the user has not clicked preferred they will not be able to add/update a patient.
No comments:
Post a Comment