I have a serial number log form (PDF) where the first serial number entered will be 0001 (it shows the leading zeros in the first text box. Formatting set to NONE ) and there after increment the following text box by 1. The calculation to increment by 1 is not the issue. I cant seem to format the text box to show the leading zeros. The second serial number comes out as "2" not "0002" as I would liked.
I take it that I'm going to need some type of "Format" java script here to get the leading Zeros to show up?
Can you post the code you're using? A small adjustment to it should be enough.
The calculation does turn a string containing numbers into a number. That's why the leading zeroes disappear.
To get them back, we can use a Custom format, using the util.printf() method.
In the case here, you would add the following to the Format event of the field:
event.value = util.printf("%04d", event.value) ;
and that should do it; the number (4) stands for the number of digits in total.