- Tue Feb 10, 2015 6:45 pm
#781954
Hello, I wan to know how to get the label of the checkgroup, no the values that are checked,I need those labels
<ScreeningInformants type="checkgroup" mode="edit" options="Array" btn_cancel="Cancel">
<en>Screening Informants <option name="1">Family</option>
<option name="2">CMHC/Private Provider </option>
<option name="3">Hospital Staff </option>
<option name="4">JJA/Contractor</option>
<option name="5">LEO/Other Agency</option>
<option name="6">Other</option>
</en>
</ScreeningInformants>
with this javascript I can get the value that are selected, but I need to get the label
var arrCheck = document.getElementsByName('form[ScreeningInformants ][]');
var report = "";
for (var i = 0; i < arrCheck.length; i++)
{
if (arrCheck.checked){
report += arrCheck.value+ "\n";
}
}
getField("summarynote").value=report;
// G.alert(report, "Checked Options:");
}
<ScreeningInformants type="checkgroup" mode="edit" options="Array" btn_cancel="Cancel">
<en>Screening Informants <option name="1">Family</option>
<option name="2">CMHC/Private Provider </option>
<option name="3">Hospital Staff </option>
<option name="4">JJA/Contractor</option>
<option name="5">LEO/Other Agency</option>
<option name="6">Other</option>
</en>
</ScreeningInformants>
with this javascript I can get the value that are selected, but I need to get the label
var arrCheck = document.getElementsByName('form[ScreeningInformants ][]');
var report = "";
for (var i = 0; i < arrCheck.length; i++)
{
if (arrCheck.checked){
report += arrCheck.value+ "\n";
}
}
getField("summarynote").value=report;
// G.alert(report, "Checked Options:");
}