简体   繁体   中英

Keeping leading zeros in Adobe Acrobat Pro XII

I need to retain leading zeros in my field. The field is not a number, but a text, because it's an alphanumeric. It's not a person who enter the number, but a third part. It's a copy/paste from a client file in a workflow. I don't know how many zeros there will be at the start. I don't need to calculate anything. It's a form and some informations in the client file wiil be copied into the appropriate fields.

Exemple : 00123456789 (I need to keep the two zeros at the begining)

I've tried custom validation, but it's only when you leave the field, and I need it when the form is opening. I've tried custom format with event.value = util.printf("%,106d", event.value); , but it's not working. I put a value before for testing it, like 00123456789, but it return 123456789.

Thanks for your help and sorry for my english.

If the workflow allows it, a very easy way would be to add a space character before or after the string. This forces string in any case, and will keep the leading zeroes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM