David, First, I'd look at the Acrobat JavaScript Guide that is on the help menu of Acrobat 5. Also, there are some example forms included with the Acrobat package. You can take a look at the JavaScripts associated with some of their functionality to get a feel for what JS can do.
If you really want to get into forms development, there are a couple of books which will help: Flanagan, David, "JavaScript, the Definitive Guide" from O'Reilly Press Deubert, John, "Extending Acrobat Forms with Javascript" Padova, Ted, "Creating Acrobat Forms" from Hungry Minds. These may be available on Amazon.com. The Definitive Guide tells you all about JavaScript itself. (There's a lot of stuff it will do which is not explained in the Acrobat documents.) Padova's book deals with JavaScript as it applies to Acrobat Forms; it comes with a CD, and has numerous examples. There are also some beginners' tutorials for forms on at www.PDFZone.com. (www.PlanetPDF.com is another good web site.) -----Original Message----- From: [EMAIL PROTECTED] on behalf of David Lindblad Sent: Sat 4/3/2004 6:46 AM To: [EMAIL PROTECTED] Cc: Subject: Re: [PDF-Forms] Required fields PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________ > If the user will have to fill out any subsequent page, the most > obvious place to check the completeness of the first page would be the > pageClose event of that first page. Here, you would check the fields > which you want to have filled, and display them to the user. You > better ask the user if it is OK to keep the fields empty, in order to > let the user go to the other pages, and then come back to the first > one. You mention "setFocus" as a method below, how would I go about checking the fields? > > So, if you encounter a non-filled out field, you could for one mark it > visually (for example by making a big fat red border around it (and > reset it, of course, when it is validated the next time...)), and you > could also set the focus to this field. You would do that with the > setFocus() field object method. Note that this method is available > only from Acrobat (Reader) 4.05 on, which means that you might have to > check for the viewer version first. > > If I remember correctly, it is the order of creation of the fields > which gets followed when checking the "required" flag. This order may > or may not be logical and predictable. It might therefore be a better > idea to do your own "required" routine, by keeping the field names of > the fields you require in an array you define when opening the > document. Such an array could also be used for other purposes, such as > printing. AND, it would give you much more control over the order of > the validation and how you present the results. > > Hope, this can help. Max, could you suggest some resource(s) for learning javascript specific to pdf's. I recognize some of what you have suggested above, (even know how to implement some of it :) but would really like to learn more. Thanks Dave To change your subscription: http://www.pdfzone.com/discussions/lists-pdfforms.html
<<winmail.dat>>
