Question Details

avatar
Welcome to the Acrobat Answers site. You're on your way! It won't take you many more points to reach the next level: Participant. And as you accumulate more points, you're also building your reputation with the community and with AcrobatUsers.com.

How do I get the correct number of nodes for an object? (LiveCycle Designer)

LiveCycle Designer: I've got a form section with nine text fields, four visible. Using a loop based on number of nodes, I allow the five hidden fields to be made visible one at a time, or hidden again, one at a time, so the user can get the desired number of fields, from the minimum four up to the maximum nine. It works perfectly.

I copied the objects to a new form, changed their names, and edited the code to make sure the proper new object names were used. I deleted some text fields, so there are six maximum. I also changed things so that only one of the fields is initially visible; five are hidden. I changed the code accordingly.

For some reason, fieldName.nodes.length now reports three nodes instead of six, regardless of whether I delete or add more fields to the design. This breaks my 'add field/remove field' buttons. Any idea what's going on?


SL DC 904 days ago


Voted Best Answer

avatar
<p>Congratulations! The Acrobat User Community selection team has approved your status as Expert in the Acrobat User Community. We appreciate all your past contributions and hope you will continue to support the community by answering questions and participating in the Acrobat Answers Q&A program as you've done in the past.</p>

<p>As an expert, you will get a badge to display on your profile with the level EXPERT next to your name and you have become eligible to be nominated to the Adobe Community Professional Program.</p>

<p>After reviewing the Adobe Community Professional Program information at https://www.adobe.com/communities/professionals/, please let us know if you are interested.</p>

<p>Someone from the selection team will contact you soon regarding the community professional program. Keep up the good work!</p>

<p>Regards,</p>

<p>The Acrobat User Community Team</p>


<p>**** Disclosure Requirements for Endorsements Received by Third Parties  ****</p>

<p>If you endorse or refer people to the Acrobat User Community in any venue,  it is our responsibility to ensure that you are aware of required compliance with the <a href="http://ftc.gov/os/2009/10/091005revisedendorsementguides.pdf">FTC’s Guidelines</a>. Both you and Adobe can be held liable under federal law for making unsubstantiated claims and for not disclosing your relationship with Adobe. In particular:</p>

<ol>
<li>Always disclose if you have received any type of incentive – free products, promotional items, travel, gifts, payment, and so on from Adobe. The disclosure must be on the same page as the endorsement.</li>
<li>Be truthful. Endorsements should not be misleading. Never make unsubstantiated or exaggerated claims about the benefits of Adobe products or programs. Any statements or endorsements about an Adobe product must be based on upon your actual experience.</li>
</ol>

Thank you again for your support of Adobe and the Acrobat User Community</p>

It is entirely possible that your form hiearchy has changed. The number of nodes should always be greater than or equal to the number of objects shown on the hiearchy window in LC designer (there are sometimes non-visual objects in the hierachy). Of course you can't actually add new fields directly, only subforms can be instanciated. So the fields are added inside of subforms. Are you sure you have the code and the hiearchy setup correctly?

Another way to check this is to examine the XML source directly. Click on the node of interest in the hiearchy window and then open the XML source view tab. If this tab is not visible, you'll find it on the "View" menu in LC Designer.

There are also some wierdnesses with LC forms that may have been introduced when you copied and pasted fields. But there is no way to tell without examining the form. If this is the case then it's just better to start from scratch:(

Thom Parker
The source for PDF Scripting Info pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often

The most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work


By Thom Parker answered 904 days ago  |   Comments (0)  |  New Comment

avatar

  |   Report
Was this answer helpful?  
2
0


Discover an easier way to work with forms.

Try FormsCentral
risk‑free for 30 days.


Other Questions Needing Answers


what is an Action?

Asked by MICHAEL WRIGHT · no replies



disabling OCR

Asked by Shawn Bannister · 1 answer