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



Reply via email to