I am brand new to Acrobat 9. I have designed all the forms and everything is in order except for one little bug.
I have 5 rows of text fields that contain LastName, FirstName and DateJoined fields.
I named the DateJoined fields the same to avoid having to reenter the date 5 times. I would like to adjust it so that the DateJoined field from the second row on down gets auto filled ONLY IF any data is entered in the LastName or FirstName fields of the corresponding row.
The way I have it now, if only one person joins on a given date, all 5 DateJoined fields get autofilled. I would like to be able to manually enter the date in the DateJoined field of the first row and the DateJoined fields of the other rows NOT get autofilled with the date from the first DateJoined field UNLESS data is entered in the LastName/FirstName fields of any of rows 2-5. I searched the forums but could not find this same problem. Thanks in advance.
1. Use an event on one of the other fields to trigger the copy. This event is called only once when the field is filled out.
2. Use the calculate event on the date field to enable the copy. This event is called every time any field on the form is modified.
Without knowing any more about how your form is supposed to work I'd go with #1 for efficiency. So for example, use the Validate event on the first name field like this.
if(event.value != null && event.value != "")
this.getField("DateJoined.Row2").value = this.getField("DateJoined.Row1").value;
The actual field names will need to be adjusted for each row.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script