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

iterate through and print Tool tip for all form fields

AlainB
Registered: Feb 25 2011
Posts: 2
Answered

Hi,
I have many multi-page dynamic forms which make use of tool tips. This is a great feature for the user but its a nightmare if you need to edit/review the tool tips.
Is there a way to produce a report similar to Acrobat's "Print with Comments Summary" feature?
I'm looking to get a printout/pdf of all fields which have tool tips and display their tooltips.
My forms are typically more than 2 pages and most textfields, tables, etc which have tool tips, are wrapped inside a subForm.
 
I'm obviously not familiar with form scripting and am overwhelmed with some of the scripiting documentation I've looked at.
 
I'm using LiveCycle Designer 8.05
 
Thanks in advance,
Alain

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Accepted Answer
Yes, this is entirely possible. The LiveCycle scripting model has functions for looping over pages and the field objects contained on those pages. The code below shows this basic double loop and the properties for getting the field hierarchy path and tooltip. The results are printed to the console window. It's gets more complex if you want a report document, like the one comment summary creates.


var nPages = xfa.layout.pageCount();
for(var npg=0;npg<nPages;npg++)
{
var oFlds = xfa.layout.pageContent(npg,'field');

for(var i=0;i<oFlds.length;i++)
{
var oFld = oFlds.item(i);
console.println(oFld.somExpression + "\n\tTooltip: " + oFld.assist.toolTip.value);
}
}

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

AlainB
Registered: Feb 25 2011
Posts: 2
Thanks so much for this Thom. I tried the code on a couple of forms which have tooltips on textFields, table cells, dropdowns etc over several pages and all of the tooltips are there.

Alain