Hi all,
i have 3 subform named as :
1. Receipt_subform[0]
2. Receipt_subform[1]
3. Receipt_subform[2]
I am currently only showing Receipt_subform[0] and hide Receipt_subform[1] and Receipt_subform[2].
I will only will display the Receipt_subform[1] and Receipt_subform[2] open user click add new table function.
how can i show the Receipt_subform[1] and Receipt_subform[2] from javacript.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Jeeva,
You can do this but would need to resolve the nodes. This is because all three subforms have the same name "Receipt_subform". The [1] is a tag showing the instance, on a zero based numbering system.
If we assume that the three subforms and the button are in the same subform then the following should work (if they are not, then you would need to include the full reference):
xfa.resolveNode("Receipt_subform[" + 1 + "]").presence = "visible";
xfa.resolveNode("Receipt_subform[" + 2 + "]").presence = "visible";
You could do a loop, but it hardly seems worth it for just two objects.
I would recommend having a different name for each subform, as this will make it much easier to reference each one.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi Jeeva,
You can do this but would need to resolve the nodes. This is because all three subforms have the same name "Receipt_subform". The [1] is a tag showing the instance, on a zero based numbering system.
If we assume that the three subforms and the button are in the same subform then the following should work (if they are not, then you would need to include the full reference):
xfa.resolveNode("Receipt_subform[" + 1 + "]").presence = "visible";
xfa.resolveNode("Receipt_subform[" + 2 + "]").presence = "visible";
You could do a loop, but it hardly seems worth it for just two objects.
I would recommend having a different name for each subform, as this will make it much easier to reference each one.
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks , Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies