Expand my Community achievements bar.

SOLVED

AEM form Numeric field removing Preceding Zeros

Avatar

Level 3

Hi All,

 

Numeric AEM form field is stripping preceding zeros fields.

 

How to have preceding zero added in numeric field.

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Check if you can do anything in script or field pattern.

 

Another alternative is :

Take the text field and add the below script in its change event

 

if(isNaN(xfa.event.change)) xfa.event.change = "";
if(isNaN(xfa.event.prevText)) xfa.event.change = "";

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Check if you can do anything in script or field pattern.

 

Another alternative is :

Take the text field and add the below script in its change event

 

if(isNaN(xfa.event.change)) xfa.event.change = "";
if(isNaN(xfa.event.prevText)) xfa.event.change = "";