Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Problem in forms number fields
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Problem in forms number fields

 Post Reply Post Reply
Author
Mazen View Drop Down
New Member
New Member
Avatar

Joined: 06 Aug 2014
Location: Kuwait
Points: 2
Post Options Post Options   Quote Mazen Quote  Post ReplyReply Direct Link To This Post Topic: Problem in forms number fields
    Posted: 06 Aug 2014 at 9:03pm
I made a pdf form with field formatted to accept number only, when typing more than 16 digits last numbers are changed, I tried it several times, it happens only when the field is formatted to "number" any body has an idea to solve this problem? I tried to change the format category to "none" the digits did not change but we don't want it to accept letters, maybe better to find a javascript code but I don't know where to find the code and where to put it

Back to Top
Sponsored Links


Back to Top
aandi View Drop Down
Senior Member
Senior Member


Joined: 07 Jul 2011
Points: 18358
Post Options Post Options   Quote aandi Quote  Post ReplyReply Direct Link To This Post Posted: 06 Aug 2014 at 9:13pm
Numbers are stored as floating point with limited accuracy. Numbers over 16 digits long cannot be exact, or must not be numbers; you need to go to a lot of trouble to keep them as strings.
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 06 Aug 2014 at 9:58pm
You can use this code as the custom keystroke script to only allow digits:

event.rc = /^\d*$/.test(event.change);

And this will not screw up the value if too many digits are entered...
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
Mazen View Drop Down
New Member
New Member
Avatar

Joined: 06 Aug 2014
Location: Kuwait
Points: 2
Post Options Post Options   Quote Mazen Quote  Post ReplyReply Direct Link To This Post Posted: 08 Aug 2014 at 1:54pm
Thank you so much try67 the code worked perfectly
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.