I have two dynamic forms with dynamic tables. I wanted to create a sort of customizable price/order form so essentially the author could edit prices and add items. To do this I will be adding a hidden "edit" button that makes all fields (items and prices) open. Another button, "save", would save the form, make these fields read only again AND hide all the buttons, including the ones in each repeatable row--theadd instance and remove instance buttons. My problem is I can only get the first instance of the buttons to hide. I found a 'for' loop but I cannot by the life of me get it to work. Wondering what I am doing wrong?? Attached is the form with scripts that I have. The "Save Form" button has the script to make the items read only and hide all the buttons on the form. Any ideas?
The link doesn't work.
Hmm, it worked for me if I download it. Anyway, here is the code I am using:
for (var i=0; i < form1.page1.pricelist.ItemTable.BodySection.Subheader.addremove.instanceManager.count -1; i++)
xfa.resolveNode("form1.page1.pricelist.ItemTable.BodySection.SubHeader.addremove[" + i + "]").presence = "hidden"
pricelist is a subform, Tables start at ItemTable. addremove is the name of the subform where two buttons are located in a table cell or row Subheader.
It actually does not remove any instances so I do not know what is out of place.
Appreciate any help