Hidden addInstance


i have repeating subform full page. want hidden , called when needed.

i have created 2 buttons on repeating subform
add form
form1.subform1.instancemanager.addinstance(1);
xfa.form.recalculate(1);

delete form
form1.subfrom1.instancemanager.removeinstance(this.parent.parent.index);

the initial instance called page. script add form button:
form1.subform1.instancemanager.addinstance(1);
xfa.form.recalculate(1);

i have tried adding line:
form1.subform1.presence="visible";

if set subform visible minimum count of 1, repeating subform works.

if set subform visible initial count of 0, repeating subform not work.

if set subform hidden minimum count of 1, repeating subform not work.

im stumped , dont know way turn. appreciated.

thanks
carol

hi,
presumably don't need set subform "hidden" if have min count of 0. no instances created until button clicked (on other page) form1.subform1.instancemanager.addinstance(1);

setting subform visible should trick, if choose set hidden. script show subform was:
form1.subform1.presence = "visible";
that script going set first instance of subform visible; it's equivalent subform1[0].presence = "visible"; may need update script use index of instance of subform added. (still, think in case don't need set subform hidden, begin with).

note need call recalculate() if you're targetting older versions of acrobat; maybe earlier 7.1?

i posted (hopefully useful) information on topic on blog recommend read:
http://blogs.adobe.com/lcdesigner/
see "script dependencies , "recalculate()" blog - little heavy article, there's stuff in there.

if doesn't help, please respond more detail; i'm not sure mean "does not work" in last 3 lines; mean subform doesn't created? or isn't visible?

mike


More discussions in LiveCycle pre-ES (6.x and 7.x) discussions


adobe

Comments