I have a subform, "OtherCaseAll_sf", with 11 checkboxes and 11 subforms ("OtherCase_sf[]"), all set to readOnly. Based on a user selection on a radio button, I either if == "1", open the parent subform "OtherCaseAll_sf", or if == "2", reset the fields in the subforms and make "OtherCaseAll_sf" readOnly again. Here's what I have on the Change event for the radio button grp:
if (this.rawValue == "1") {
OtherCaseAll_sf.access = "open";
} elseif (this.rawValue == "2") {
var f1 = OtherCaseAll_sf.somExpression;
xfa.host.resetData(f1);
OtherCaseAll_sf.access = "readOnly";
}
I preview my form, click "1" - great, my 11 checkboxes open up as planned. I check CB1, which has
if (this.rawValue == "1") {
OtherCase_sf.access = "open";
} elseif (this.rawValue == "Off") {
var f1 = OtherCase_sf.somExpression;
xfa.host.resetData(f1);
OtherCase_sf.access = "readOnly";
}
OtherCase_sf opens up, great. If I unclick CB1, the data entered in OtherCase_sf clears out, and OtherCase_sf goes back to readOnly.
If I do not unclick CB1, but instead change my mind on the first radio button (change to "2"), the data clears out and the subform OtherCaseAll_sf seems to be read only. However, if I now toggle between "1" and "2", whichever subform "OtherCase_sf[]" I had opened before remains open. I thought the access property for the container subform OtherCaseAll_sf would override anything else.
What am I missing?????