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

Leading Zero in numeric field not displaying

goslinc
Registered: Sep 25 2007
Posts: 114

I have a field that is a numeric type. It needs to allow users to enter exactly six digits. Sometime, those six digits will have a leading zero. What I need to happen is have that leading zero display both on the form (which I am using LCD 7.0), and I need to have that leading zero show up on the XML file

Can someone please help me? Is anyone out here on Saturday?

Thanks

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Have you tried the display pattern of "z,zz9.99"?

Entering the value ".499" into the form field displays "0.50" and exports the following XML file:

<?xml version="1.0" encoding="UTF-8"?><form1><NumericField1>0.49900000</NumericField1></form1>

And you can write a custom validation script in JavaScript to limit the input values, like:
this.rawValue >= 0 && this.rawValue <= 9999.99;

George Kaiser

goslinc
Registered: Sep 25 2007
Posts: 114
I truly appreciate your suggestions but am so inexperienced I cannot follow it.

My users will always be entering a code taken from such displays as: 01-3-000 or 03-9-200 or 32-9-200. They mere represent say a employee id. When they enter their ID into my form, I want to make sure they enter all six digits, never entering the 03-9-200 as 3-9-200. AND, I want to make sure the leading zero does display.

Can you stick with me to help me understand further? Thanks so much
goslinc
Registered: Sep 25 2007
Posts: 114
Another example I need to "force" users to input a date field as YYYY-MM-DD how would I do that?

At first I have the field set up as a calendar field, where they would merely select from the drop-list the date off the displayed calender. However, not all users use the calendar, some were manually input a date, and it is not coming through from my xml file into my database consistent.

Any ideas of that? Thats why I thought perhaps, just remove the calendar drop-list feature and make it a text field and some how force them to enter it a certain way: YYYY/MM/DD
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
User to user forums are for quick questions by users with some very basic knowledge of the area they are asking questions in.

First, you should look at the "eSeminar On-Demand" on the AUC home page and see how LiveCycle Designer works in general. Read some of the "How To" listings, search the "Ask the Expert" posts. And read throught the "Scripting Reference" included in LiveCycle Designer's help.

Since you asked for information about using leading numbers on numeric strings when you really wanted to know how to format an (employee) id string with a custom format, indicates you need far more help than can be provided in a simple forum. Please learn more about the programing in general and how the various options of LiveCycle Designer fit and work together.

George Kaiser