I've got a form which uses the instance manager to add/remove subforms, and it works fine. I just recently created a new XDP from scratch via designer, and cannot replicate the functionality. I have a single subform, with a flow layout, which contains two subforms, Header and Body. The header contains a button which should add an instance of body onclick. The body subform has the Repeat Subforms...checkbox checked and both min count and max count are unchecked. Whenever I click the button it says that the object has violated it maximum number of occurrances,even though there is no max set. Am I missing something else?
Here are the snippets I have tried onclick:
_Body.instanceManager.addInstance(true);
_Body.addInstance(true);
_Body.setInstances(1);
Thanks.