Here’s a sample in response to “Ernest’s question”:http://blogs.adobe.com/formbuilder/2006/09/selecting_specific_database_records.html#comment-49371 on passing values to PDF forms via URL. His intent is to use it to provide a key to a PDF form such that it can be used to filter records from an “ODBC Data Connection”:http://blogs.adobe.com/formbuilder/2006/09/selecting_specific_database_records.html in order to pre-populate the form with data.
I love these kinds of questions because they challenge me to find answers!
Of course, this is quite specific but there are many other uses for this. In fact, you could have a whole lot of fun with it too! You could even use this to alter the appearance of your form: Say you had one form that you were using for multiple departments in your company and every department had its own header. You could place each header in a subform, make them all hidden and then, based on the URL request which would include a department code, decide which one to show — no XML Data file, database connection or web service needed!
Beware, however, that URL request strings are *not secure* because they get posted in plain text for anyone to read so be careful of the information you pass-in to your form this way.
This sample form looks for a “message” and a “color” key in the URL request in order to show a message in a text field and change the text field content area’s color (an RGB value). For example:
* == //URLRequests.pdf?message=Isn’t%20this%20cool%3F == — Shows the message “Isn’t this cool?” in the text field.
* “//URLRequests.pdf?message=Think%20of%20the%20possibilities…&color=0%2C255%2C0″:http://blogs.adobe.com/formbuilder/samples/URLRequests.pdf?message=Think%20of%20the%20possibilities…&color=0%2C255%2C0 — Shows the message “Think of the possibilities…” in the text field and makes the text field green.
“Download Sample [pdf]”:http://blogs.adobe.com/formbuilder/samples/URLRequests.pdf
*Minimum Requirements:* Designer 7.0, Acrobat 7.0.