Adobe changes my numeric field to include commas when validation fails. My numeric validation setting is num{zzzzzzz9.99}. I want my numeric field to display as 99999999.00, no commas and only to have 2 decimals places. I added this validation to the Display, Edit, Validation and Data tabs under the validation pattern dialog box.
When validation fails, adobe changes the display of the field to include commas and drops the decimal places:
999,999,999
How can I prevent this from happening? Any feedback is greatly appreciated.
I've also added a change event to the field as well:
\\only allows numbers and period.
if (xfa.event.newText.match(/[^0-9.]/)) |
{
xfa.event.change = "";
}
\\only allows 11 characters to be entered.
var maxLength = 11;
if(xfa.event.newText.length >maxLength)xfa.event.change = "";
Views
Replies
Total Likes
Sorry, I can't follow your explaination.
What value do you enter in your field and what way you would it like to be displayed?
Views
Replies
Total Likes
I want it to display only numbers followed by 2 decimal places.
999999999.00
If I type all numbers in my field like 999999999999 and I go over the character limit of 11. My validation fails and then my numeric field is displayed with commas, 999,999,999 without the 2 decimal places. Is there a way to prevent adobe from automatically changing my fields?
Views
Replies
Total Likes
The displayed number has nothing to do with the validation that fails.
If it is not possible to format the entered value with the display pattern, the value will be formatted as there is no display pattern.
Just change your display pattern into something like num{zzzzzzzzzzzzzzzzzzz9.99}, so it will format larger numbers too.
Views
Replies
Total Likes
Thank you, this worked!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies