Hi,

I have field to fill in like :

When I put Badge No: 29 , then the field auto 6 digit like : 000029 

How to make it ?

Thanks

Hi Ayu,

It's easy, you should use javascript on input box keyup event


("000000" + num).substr(-6,6);

per ES6 version

let padToSix = number => number <= 999999 ? `00000${number}`.slice(-6) : number;
Solution

Hello Ayu andini,

Please refer this OML

Solution