These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

programmatic way to determine if a field is a text field AND if it is a comb field

AcrUmbi
Registered: Dec 2 2010
Posts: 18

Hello,
 
Designing a form in LiveCycle ES 8.2. Is there a way, via JS to determine if a field is a (1)text field and (2) whether it is set up to use combs? I may be asking the wrong questions though. What I want to do is if/when a form is going to be printed out to paper, I want to "white out" the comb field lines yet retain the spacing of each individual character. So I can't really change the field programatically to NOT user comb fields, since that affects the spacing of the individual characters, instead I am tring to find a way to set the individual combs (cells)' box lines to white.
 
Thank you for your time.
-Her

My Product Information:
LiveCycle Designer, Windows
AcrUmbi
Registered: Dec 2 2010
Posts: 18
Hmn, no takers eh? I know this is probably a bit on the complicated side, or perhaps even impossible.

After doing much much much reading...I still don't have much to go on. I came across a PDF technical document that referred to the invidiual comb boxes' lines as tines (?). It also said that or hinted at, it's all a blur now, that the color could be controlled via fields' border edge element. Specifically it referenced the 3rd edge. Odd. So am trying to hunt that down. I am having a hard time with the following JS syntax:

var edges = xfa.resolveNode("vcFirstName.ui.#textEdit.border.edge[*].color");
========
for(var i=0; i<3; i++)
{
xfa.host.messageBox(edges.item(i).toString(), i.toString(),3);
}
=========
The exception being thrown is:
TypeError: edges.item is not a function

I've attached the above script to the enter Event of the field, could that be an issue?

Thank you.
Her

maxwyss
Registered: Jul 25 2006
Posts: 255
It could be that XFA / LCD is too limited to allow for such a simple task.

In a PDF form, it would be something like this:

if (this.getField("myField").type == "text" && this.getField("myField").comb == true) {
// yep, we have a text field with comb
} else {
// no, we don't have a text field with comb
}

Hope this can help.


AcrUmbi
Registered: Dec 2 2010
Posts: 18
Hello max,

Thank you for posting but no that didn't work. Hopefully someone else can help me out...I'll keep trying similar approaches to what you've stated.

HER