PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________

I strongly suggest to re-evaluate the need for server-side validation. First, it creates all those problems you list here, and second, it creates an unnecessary load on the network.

You can do quite a lot client-side, and a server call should really only occur when the client-side possibilities are not adequate (such as highly dynamic data, very complex database queries, extremely complex calculations, etc.). Any other things should be treated client-side (otherwise, you could wonder why not use a ?ML form to start with...).

Particularly the date formatting/validating issue is something which can very easily be done client-side, using simple JavaScripts.


Now, if you really need server support, you have a few options.


a) As you know from which field you called the server support, you could add a /JavaScript key with the /After option to the FDF you send back to the form, and specify a setFocus() command in this script. What happens here is that the form gets the new data, and then, that script gets executed. This method works with Acrobat 5 and newer

b) You could send back a new PDF which you have filled out server-side, using utilities such as FDFMerge from Appligent. You could then set either a hard-wired, or an indirect reference to the field you want to set the foucs to when this new document opens. Hard-wired means that you have an explicite setFocus() command, indirect means that you have an invisible (and readonly) which you populate server-side, and which contains the field name of the field to set the focus to. The PageOpen script will take the value of that field and set the focus accordingly. This method works with Acrobat 4.05 and newer.

c) You use a webservice for your server-side actions. You then use the SOAP object in the PDF to connect to that webservice and retrieve the result. This is a complete "in-line" option, which will not affect your tabbing order etc. This method works with Acrobat 6 and newer, AND, if Reader has to be supported, requires the Extended Forms Rights (to be applied to the base document using the Adobe Document Server for Reader Extensions).

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:
* PDFConference 2003 in Anaheim, CA, November 9 to 13, 2003 (http://www.pdfconference.com)
* And, as always, available for on-site workshops/tutorials/consulting.



_________________________



I am creating PDF forms which interact with my server. I would like to be able to tab off a field and have the contents of the field validated by my server. For instance, we support more date formats than PDF so, when the user tabs off a text field which is to contain a date, I send a request to the server to validate it. I may also runs scripts on the server at that time. To do this, I attach javascript to the format event.




This successfully triggers a command to the server which comes back and the form is updated. Unfortunately, I also lose the focus. Instead of focus going to the next field in the tab order, it just disappears and the user has to click on a field to continue. I have tried modifying the code to trigger on validate or calculate events but this only makes things worse.



Can anyone give me some clues as to how to both go to the server and get the focus on the next field?



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



Reply via email to