Print Page | Close Window

Arraylist or something better?

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
Printed Date: 21 Oct 2019 at 9:12pm
Software Version: Web Wiz Forums 11.10 -

Topic: Arraylist or something better?
Posted By: skowalczyk
Subject: Arraylist or something better?
Date Posted: 22 May 2015 at 3:42pm
Help, please?
I've been thinking about the best way to accomplish this for hours.  I need advice.  I cannot provide the actual documents, but I will try to explain in detail.
          Company Name, Company Code, Company Level, Company Branch
Row 1       ABC                  123                    456                 Atlanta
Row 2       XYZ                  987                    357                 Tampa

Form - Page 1:
Text Field - person enters a specific Code
Form - Page 2:
4 Text Fields - that will pre-fill based on the specific Code from page 1
I need to reference the code from Page 1, and then pre-fill these 4 text fields (on Page 2) with the appropriate data from the table above.
Example: If Page 1 Code = BBTPA, the 4 text fields (on Page 2) will pre-fill with the data from Row 2 (from Table).
What is the best way to accomplish this?  An arraylist?  Is there something else that would be better?
Thank you in advance!!

Posted By: gkaiseril
Date Posted: 22 May 2015 at 8:13pm
There are many different ways that this can be done in with JavaScript. But if you want a method that will allow the company list and codes drop down to update the drop down list when the form is opened and automatically adjust the code being posted to the other form, I would use an array or data object to enter the details and then use that object to populate the fields base on the selected item in the drop down field. - Changing Another Field with Combo Box (Drop Down) Selection by Thom Parker

Posted By: skowalczyk
Date Posted: 22 May 2015 at 8:27pm
Thank you for the reply.  All the fields are text fields.  I need to incorporate the table information into the form, either by creating an arraylist or perhaps something better. 

Then, I need to check the code from Page 1, cross-referencing the code with a possible arraylist, then pre-fill the 4 text fields (on Page 2) with the appropriate data.

The text field value from Page 1 is basically the driving force; it determines what info pre-fills into the text fields on Page 2.

Thank you!

Posted By: gkaiseril
Date Posted: 22 May 2015 at 8:42pm
The tutorial linked to should get you started. There are 3 fields being updated by one level of the data object. And more elements to the to the level entry for the data object and you can add more fields. It makes no difference on what page the fields are located.
Did you download the sample form try it. Then try adding a new department and updating the department list in the drop down box and see how it works.

Posted By: skowalczyk
Date Posted: 22 May 2015 at 9:45pm
I will definitely check it out.  Thank you so much!

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -