Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Numeric field changes to 2147483647 automatically

Avatar

Level 4

Hi

I have a numeric field in the form which is not taking any value more than 9 digits. If we try to enter more than 9 digits, It automatically changes to

'2147483647' number.

Can anyone the reason pls and also the solution.

Thanks In advance

Abhiram

2 Replies

Avatar

Level 9

Hi Abhiram,

What validation pattern have you set for the field?

Thanks,

Bibhu.

Avatar

Level 10

Hi Abhiram,

This is the maximum for a numeric field, anything above this value will be truncated (this is 2^31 -1).  You may want the following JavaScript in the change event of the field.

var newValue = parseInt(xfa.event.newText, 10);

if (isNaN(newValue) || newValue < -2147483648 || newValue > 2147483647)

{

    xfa.event.change = "";

}

If you need larger values your will need use a text field.

Bruce