These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

.occur = (0); or instanceManager? to start with index of 0

voldemort
Registered: May 1 2008
Posts: 9

Im utilizeing a flow sub form but I need an initial state of zero. I cannot seem to get this to work without at least one instace present from the start
Ive tried an initial state of hidden and then to make it visible then the add button proceed.
this seems more of a hack
Ive tried
.occur.min
.occur.initial
both set at zero and it dosnt work

the button is a simple
.instanceManager.addInstance = ();
Ive tried specifying 0 initial both in the gui and in java and formcalc

does anyone know how to make a dynamic flowing subfield with an initial count of zero

thanks in advance

My Product Information:
LiveCycle Designer, Windows
voldemort
Registered: May 1 2008
Posts: 9
got to thinking I better rephrase my question
when I say zero I realise that LiveDesign treats count 0 as 1
basically I need an empty subform initially and for them to click the button as needed---they may not need the field at all

thanks
cyanstudios
Registered: May 6 2008
Posts: 81
I'm new here so I hope I'm not interpreting your question wrong, but I understand you can set the initial count as 0, then use the following code on the click event that brings up the new instance: (bold is a variable)

_[b]dynamicsubform[/b].addInstance(1)
xfa.form.remerge();

The underscore before dynamicsubform is key.
You can also create a button inside the subform for deleting the added instance with this:

[b]dynamicsubform[/b].instanceManager.removeInstance(this.parent.parent.index);