I would try having every field visible and seeing if you can save it then. Assuming you can and nothing is hidden, etc., try hiding the items. When you change the visibility of those items, do you also change the required state (item.setRequired(true|false))?
I think that's where your problem might be. So, when you set the visibility to false, add a line underneath it which will set the required state (for previously-required items) to false, as well. Don't forget to set the required state back to true for these fields once it's visible again.Dave
for (var i=0;i < IWDatacapture.getItem("/paragraph").getChildren().length;i++) { setItemStatus(IWDatacapture.getItem("/paragraph[" + i + "]/content"),!flag);}