Hi, just sharing here is my trick to implement this
Say that you already had a VALUE (number), and let say you want to save in 5 digits of text with “0” on the left.
then put a “dummy input” (text format, hidden) with initial value is “00000VALUE” …then save in db as “dummy input’s value:truncated from end to 5”.
Eg. If you have 123, dummy input’s value will be 00000123 (text) and when you save you have 00123 (truncated from end to 5).
Do the same way when let say you need 10 digits, dummy input’s initial value shall be “0000000000VALUE” and save as “truncated from end to 10”
Note, VALUE’s max no of digit shall be < no of digits you truncates from end.