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.

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 Wyss PRODOK Engineering Low Paper workflows, Smart documents, PDF forms CH-8906 Bonstetten, Switzerland

Fax:  +41 1 700 20 37
  or  +1 815 425 6566
e-mail:  mailto:[EMAIL PROTECTED]
http://www.prodok.com



[ Building Bridges for Information ]


______________________




Shameless Plug:

My next conference appearances and workshops:
• Conference presentations at the 2004 Symposium of the BFMA, May 23 to 27 in Reno, Nevada (http://www.bfma.org) and pre-/post-conference workshop, May 22/23 and 27, organized by essociates Group (http://www.essociatesgroup.com/AdvancedAcrobatForms.htm)
• And, as always, available for on-site workshops/tutorials/consulting.



_________________________






If I have a multiple page order form, with the first page being the user contact info, what would be the best way to check the required fields for this page before the user continues? I don't want them getting to the last page of what will probably end up being a 10 page form and have to send them back to page one.

Couple other questions, I tried a submit button on the page to test the required fields and noticed it did not seem to follow any particular order. I have a "Name" field followed by "Address" and so on... when I click Sumbit the first field I was alerted to was the "Address" field, not the "Name" as I would have expected. Checked the tab order, which seems to have nothing to do with it, any thought?

Lastly, on the required field subject, is there a way to automatically jump back to a field that has been missed?



To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html



Reply via email to