How to print out a text input without losing the first zero

How can you print out in the template or in export file a value that was stored in text input, without losing the first zero? I understand that this would be happen with no assigned attribute, currency, integer or other numeric inputs but why with text?

I did some testing and the first zero will be printed out if I place a dash or any other non-numeric character after the number. How could we get a true text input, where the platform is not trying to outsmart me think it know better than me what I want to see.

{% input custom.phone.number_1 as:text %}
{{ custom.phone.number_1 | text }}

{% input custom.phone.number_2 as:text %}
{{ custom.phone.number_2 | text }}

{% input custom.phone.number %}
{{ custom.phone.number }}

Right now we are not able to print out area codes or phone numbers in our templates or txt export file because of this. This doesn’t seem to affect the template preview or PDF export.

How can you print out the true content of the input?

@jarvela thanks for posting on Community.

Please add .string_value to your custom variable, like:

{{ custom.phone.number_1.string_value }}

…that will do the trick. The | text filter is not necessary.

Please inform us if you have any more questions.