These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

A newbie needs help on using forms in acrobat 8

Pushfate
Registered: Jan 21 2011
Posts: 6

Hi
 
I'm mainly a layout artist for the a publishing company so I know very little about creating forms in acrobat.
 
I created a home decor catalogue layout for a client for print who now want me to create an electronic version with auto fill form fields,and a submit button.
 
I have figured out how to place forms fields like check boxes and submit button, but how I want the design to work electronically, is that when a check box is clicked underneath a product, I want that products information to auto fill in the order form provided at the back of the electronic catalogue.
 
Firstly I want to know if it is possible to do that and how it is done, I have no knowledge of javascript or any programming language.
 
Any one out there that can help me please.

My Product Information:
Acrobat Pro 8.0, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It's possible, but it depends how you set up your form.
Do you have all of the information you want to fill in inside form fields, or is it just a part of the document's running text? The former will be easy to implement. The latter difficult to impossible (depending on your setup).

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Pushfate
Registered: Jan 21 2011
Posts: 6
Yes I have all the info in an excel document with the corresponding fields I have in my order form, what I cant figure out is how to access that data so that it auto fills as a list on my order form when a check box under the product on the graphic pages is checked.

If you can explain how to do that it will be so helpful.


try67
Expert
Registered: Oct 30 2008
Posts: 2398
Well, there's a big difference between having the data in an external file (Excel document) and having it as a part of the PDF form itself (for example, in hidden form fields or as a text attachment).
A script in Acrobat has very limited capabilities in accessing external information. Basically it needs to either be imported or placed in a database. Either option requires complicated custom-made scripts to work, and will not work if the file is used in Reader.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Pushfate
Registered: Jan 21 2011
Posts: 6
Is there a way it can be done and can you explain how coz I have a program that can merge and external file like an excel document with a pdf so that the info can be accessed without a database

Im not really sure how all this is suppose to work so any further info you can give me would be great!

And thanx for the help
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Converting an Excel file to PDF is not a problem. Acrobat can do that.
The problem starts when you need to find the information in order to populate the script.
As I said, the best option is to have it in form fields, such as text boxes. You can even hide them so the user is not aware of them.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Pushfate
Registered: Jan 21 2011
Posts: 6
Oh wait the info is part of the pdf and it appears in the graphic pages under the product picture and it contains all the necessary field like product ID,description and price.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
I have a feeling we're going around in circles...
If the info is a part of the running text of the file, then you can (try to) find it using the getPageNthWord() method. See the Acrobat JavaScript Reference for more information.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Pushfate
Registered: Jan 21 2011
Posts: 6
Sorry for going in circles Im new to all of this but thanx, just one more question.

So how to I get the data in a hidden text field to appear when a check box is clicked

And thanx again you have already helped so much
try67
Expert
Registered: Oct 30 2008
Posts: 2398
In the text field where you want to fill in the value you check for the value of the check-box, and if it's on, you use the getField method to get the value you want. Something like this:

if (this.getField("Check_Box_Name").value == "Yes") {
event.value = this.getField("Name_Hidden").value;
} else event.value = "";

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Pushfate
Registered: Jan 21 2011
Posts: 6
Hey thanx a million will try this