Hi there, first post.
Can someone steer me in the right direction:
I want to create a education based form. I would like to add the following functions to this form:
1) Create a drop down list so that I can select a class
2) Depending on the class selected, all of the students names and ID's are populated.
Basically, I want to create one generic pdf which any teacher can access and generate their own rolls, dependent on the class selected. There are 10 classes, each class has 15 students.
Number 1 is easy.
Number 2 is difficult, as number 2 would have to be linked to selection in number 1.
Can this be done in acrobat?
Will I need Livecycle?
Will it involve programming?
Can it be done in Acrobat?:
Yes, and something similar has been done a dozen years ago, and then been in use for more than ten years.
Will I need Livecycle?
Livecycle what? Livecycle is a server product range by Adobe, intended for big organizations. But I assume you are talking about Livecycle Designer. In that case my answer is "you can use it, if you want to make your life miserable"…
Will it involve programming?
Yes, it will involve a little bit of programming.
Now, for a way to implement it:
Let's assume that you will have only a few forms, which means that it is acceptable to manually add document-level scripts.
The idea is to set up a students/student ID table as a document-level script. Tables are represented in Acrobat JavaScript as Arrays. In your case, you will have a multidimensional array (sounds more intimidating than it is). The main array represents the list of your classes. Each class is an array itself. The first element represents the name of the class, and all following elements are little arrays representing the individual students (you may have 2 elements, name and ID, or more, if you want to add more granulated information). You make the definition of this array a document-level script.
So, you have the data table. Now, how do you link it to the drop down menu (represented as a combo box). You can do it manually (may be a little tedious and can cause errors). You set up the items of your combobox so that the "face value" is the name of the class, and the "return value" is the index of that class in your classes array. And that's all needed about the selection of the class.
Filling the student information depends on how you have set up your form. You essentially load the data from your selected individual class array into the according fields.
This is essentially how you would proceed. If you have many students and classes, it may be worthwile to use a database application, such as FileMaker Pro, or even Excel (if you are not blasting some internal limitations of Excel), to assemble the document-level script. It would involve simple text manipulation and concatenation.
If you have a bigger number of forms, but only very few workstations preparing the forms, you may use the same code as an application-level script instead of a document-level script. Then you would have access to it from any form loading the data when opening (in the document's document level, or PageOpen script, you would create the items array for your combobox (see setItems() entry in the Acrobat JavaScript documentation).
THis should not be thaaat difficult to implement. However, if you prefer "buy" over "make", feel free to contact me in private.
Hope this can help.
Max Wyss.