hi rob, if i understood your problem, this could be the solution:
somewhere you have your javascriptt(mandatory checks). you could go through the subforms and check whether they are visible or hidden:
if(mySubform[i].presence==visible){
(mandatory checks);
}
hope this will help.