It looks like the form dependency script expects HTML in the form
<label>ID Number<input type="checkbox" name="id" class="DEPENDS ON info BEING student"></label>
and does not handle other cases.
If you add attributes idto your entries and attributes forto your labels:
<input type="checkbox" id="id" "name="id" class="DEPENDS ON info BEING student"><label for="id">ID Number</label>
and in FormManager.js add this to the end showEl()and hideEl()(inside setupDependencies()):
var id = this.id, labels = document.getElementsByTagName('label'), l = labels.length, label, i;
for (i = 0; i < l; i++) {
label = labels[i];
if (label.htmlFor == id) {
label.style.display = 'none'; // 'none' for hideEl, '' for showEl
}
}
he should work.
source
share