I have just finished a form which includes number of buttons which add/remove instances. The form will be operated by users on two tiers. First one will prepare the form adding necessary instances while the end user should only fill in text fields and select some radio buttons.
I need an assistance in disabling (making them invisible will be also ok) all buttons in the form by pressing one button or checkbox.
I founded a script which makes all fields readOnly while pressing Submit button but it's not what I am looking for.
I named all the buttons with btt1, btt2 etc, but they are on different levels and also there will be as many of them as many times new instance will be added by the middle user.
I suspect that it can be done with resolveNodes but frankly I have no idea how to use it to find all buttons in my form, especially if they are located on different levels.
I would be very grateful for help.
Thx in advance
Jack
for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
var oFields = xfa.layout.pageContent(nPageCount, "field");
var nNodesLength = oFields.length;
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
if (oFields.item(nNodeCount).ui.oneOfChild.className != "button")
{
oFields.item(nNodeCount).access ="readOnly";
}
}
}