Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Method that returns type of controls (buttons, radio, textfeild, etc)

aaa10013
Level 1
Level 1

Dear all, 

     I'm usinf LiveCycle ES2 and trying to hide all buttons in the PDF forms when a signatures is inputted. To do so, I have to loop through all nodes/fields in the form using the below function, but I could not help finding the method that returns the type pf field/controls so that I only hide buttons not others fields/controls such as textfield, radio, signature etc..Can anyone help me to find the method that return the type of control/field please? The place where I need this method is surrounded by @@@. 

 

function ProcessAllFields(oNode)
{
if (oNode.className == "exclGroup" || oNode.className == "subform" || oNode.className == "subformSet" || oNode.className == "area")
{
for (var i = 0; i < oNode.nodes.length; i++)
{
var oChildNode = oNode.nodes.item(i);
ProcessAllFields(oChildNode);
}
}
else if (oNode.className == "field" && @@@@ oNode type is "button" @@@)
{
oNode.presence = "hidden";
}
}

1 Accepted Solution
Mayank_Tiwari
Correct answer by
Employee
Employee
3 Replies
Mayank_Tiwari
Correct answer by
Employee
Employee
Mayank_Tiwari
Employee
Employee

Also, By default, signing Signature field doesn't hide the objects, but it rather locks them.

You may see this sample form for how to lock specific objects in the form on signing the Signature field.

https://drive.google.com/file/d/1mDG3NxvfohFs-bcM-nB1oDoajeM3mfRW/view?usp=sharing

Mayank_Tiwari_0-1636729776297.png

 

 

aaa10013
Level 1
Level 1

Thank you for the help. Looking into the to the section you sent, I could find the method which is control then .ui.oneOfChild.className == "button"..