Pad numbers with '0' digits on the left

  • Profile Image
    Asked on May 09, 2017 at 06:26 PM

    In a masked entry I need to enter a number, if the length is less than 10 digits, I should fill with zeros to the left, I have entered the format ##########, to make sure they are just numbers, But I do not know how to make it fill with zeroes to the left, can you help me?

    This is a re-post of a comment on Getting Started with the Basics of Input Masking

  • Profile Image
    Answered on May 09, 2017 at 10:19 PM

    I'm afraid to say that it is not possible to mask an entry if the length is less than 10 digits, it should fill with zeroes on the left. The masked input is intended only to force an input mask and limit the characters or digits on the text field.

    Alternatively, you can use a Masked Input Widget, where you can have a number precision (Number of decimal places to use), the thousand delimiters, the decimal delimiter, the prefix text like a currency symbol and the default number to be displayed.

    Let us know if you need further assistance.