Hello,
I have created a form that uses a dynamic entry subform which adds new lines or removes existing lines per button clicks.
The dynamic entry subform functions correctly if the subform is set as VISIBLE upon opening the form.
However, if I start this dynamic entry subform as HIDDEN and use 2 radio buttons to hide or show the subform objects (subform default is set to hidden), the dynamic entry subform that adds new lines will fail when clicking on the ADD button.
The ADD button uses this javascript:
SubformName.instanceManager.addInstance(1);
The REMOVE button uses this javascript:
this.resolveNode("SubformName").instanceManager.removeInstance(this.parent.index);
xfa.form.recalculate(1);
The show and hide radio buttons use these scripts:
HIDE:
{SubformName.presence = "hidden"
SubformName2.presence = "hidden"
SubformName3.presence = "hidden"
}
SHOW:
{SubformName.presence = "visible"
SubformName2.presence = "visible"
SubformName3.presence = "visible"
}
HIDE is the default radio button setting. SubformName is the dynamic entry subform. Name2 & Name3 are other subforms that are hidden or visible.
I can attach the example form if that would help with debugging of the script(s).
Any suggestions would be appreciated.
Thanks,
Eric
Solved! Go to Solution.
Views
Replies
Total Likes
Eric,
I looked at your form.. Follow the below steps to resolve your issue..
1) Wrap the "item2" subform within another subform. (for example "Subform_Item2").
2) In the item2 properties, change the presence setting to "Visible" instead of "Hidden".
3) In the Subform_Item2 properties, change the presence setting to "Hidden".
4) In the radio button change events ( for 3 bids and 6 bids), change the reference from "item2" to "Subform_Item2" (to the newly wrapped subform).
Subform2.presence = "visible";
Subform_Item2.presence = "visible";
TotalsSection2.presence = "visible";
5) In the Add Another Row button click event, change the code to the below.
Subform_Item2.item2.instanceManager.addInstance(1);
This resolved the issue in my system.
Let me know if you still have issues.
Thanks
Srini
Views
Replies
Total Likes
Send the form to LiveCycle9@gmail.com so I can have a look at it. Please mention where the problem is..
Thanks
Srini
Views
Replies
Total Likes
Eric,
I looked at your form.. Follow the below steps to resolve your issue..
1) Wrap the "item2" subform within another subform. (for example "Subform_Item2").
2) In the item2 properties, change the presence setting to "Visible" instead of "Hidden".
3) In the Subform_Item2 properties, change the presence setting to "Hidden".
4) In the radio button change events ( for 3 bids and 6 bids), change the reference from "item2" to "Subform_Item2" (to the newly wrapped subform).
Subform2.presence = "visible";
Subform_Item2.presence = "visible";
TotalsSection2.presence = "visible";
5) In the Add Another Row button click event, change the code to the below.
Subform_Item2.item2.instanceManager.addInstance(1);
This resolved the issue in my system.
Let me know if you still have issues.
Thanks
Srini
Views
Replies
Total Likes
Hi Srini,
The addition of the subform wrapper has fixed the issue. Once I adjust the various calculation fields with this wrapper, it should work great.
Much thanks,
Eric
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies