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

Height Field Question

Nezmin2
Registered: Apr 23 2008
Posts: 4

Hey Guy's and Gal's,

I am trying to set up a Height field that will force a 5ft 9in format. The issue is that 90% of my customers are seniors so it needs to be as user friendly as possible. However, clarity on both ends is extremely important.

Thanks for your time.

Nezmin2

"I never drink coffee at lunch. I find it keeps me awake for the afternoon." Ronald Reagan

My Product Information:
Acrobat Pro 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I'm afraid that you are going to need to be a bit clearer youself. Please explain exactly what you are trying to do. What do you mean by "5ft 9in" format? Who creates what? etc.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Have you considered using a combo box? For example, you could list all heights between 4'-0" to 7'-6" in one inch increments.

George
Nezmin2
Registered: Apr 23 2008
Posts: 4
Thanks Guy's,

The field is for height information, i.e. how tall are you?, and therefore the format needs to be 5ft 9in, not 5' 9", or 5feet 9inches. Using a drop down box would be to extensive due to the fact that we deal with people of extensive various heights. (we are a health insurance company)

Here's what I have done:

1. Added a hidden field with an example of the format to be entered.
2. Changed the action of each input field to show/hide the example field.

Nezmin2

"I never drink coffee at lunch. I find it keeps me awake for the afternoon." Ronald Reagan

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
With 2 drop down boxes there is a very finite number of options, 12 for inches (0-11) and maybe 8 (1-8) or less for the feet option. One then could create a string field that combines the export value from the foot height and inch height combo boxes into a the desired formatted string.

If you want to do this in a text field you will need to decide on a standard string format, explain this in the form, and code custom keystroke, format, and validation scripts.

George Kaiser

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There are a number ways you could implement this. The Georges have both pointed out the simplest solutions, using a pull down. But you could also use two text fields that add "ft" and "in" to the entry in a format script. Or you could use a custom keystroke event to force the more complex formatting of "ft" and "in" in a single fields. But this is the most complex and difficult of the solutions.

For ease of use and simplicity of implementation I'd go with the two combobox solution.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script