# Number input that accepts 0 left

**URL:** <https://community.glideapps.com/t/number-input-that-accepts-0-left/60762>\
**Category:** Ask for Help\
**Created:** [April 20, 2023, 1:57pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762 "2023-04-20T13:57:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joanna\_Delg](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joanna_delg/32/54763_2.png) [@Joanna\_Delg](https://community.glideapps.com/u/Joanna_Delg)\
**Post date:** [April 20, 2023, 1:57pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/1 "2023-04-20T13:57:47Z")

</div>

Hey guys! I have a number input where i want it to accept and read 0 left, but if the user input some data with 0 left the application doesnt recognize it and erases the zero automatically. There is some way to fix it?

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 20, 2023, 2:02pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/2 "2023-04-20T14:02:55Z")

</div>

Hi,

You mean you want the user to enter “0 left” in the number entry?  
If so, it’s not possible as number entries only accept numbers.

What is your scenario exactly? Maybe you could implement some workaround.

---

<div class="post-metadata">

**Author:** ![Joanna\_Delg](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joanna_delg/32/54763_2.png) [@Joanna\_Delg](https://community.glideapps.com/u/Joanna_Delg)\
**Post date:** [April 20, 2023, 2:09pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/3 "2023-04-20T14:09:51Z")

</div>

Yes! My number entry is a government registration of brazilian companies, and sometimes it can start with the number 0. But, my application erases the 0 on my data base when it happens.

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 20, 2023, 2:22pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/4 "2023-04-20T14:22:34Z")

</div>

What you can do instead, as it’s an ID, is use a text entry instead of a number entry which will keep the 0.

Can your gov id contains number and letters?

---

<div class="post-metadata">

**Author:** ![Joanna\_Delg](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joanna_delg/32/54763_2.png) [@Joanna\_Delg](https://community.glideapps.com/u/Joanna_Delg)\
**Post date:** [April 20, 2023, 2:47pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/5 "2023-04-20T14:47:21Z")

</div>

So i thought about it too, and right now i am usgin the text entry. Even with this specified in the “max length” field the user can put more than 14 (or even press the enter of the keyboard) and the application continues to work.  
The problem is that this field is meant to perform a search in my database, and I have some rules for:

- If the input data is equal to any data in my database: return X
- If input data is not found in the database, return Y:

What is happening is that the user puts a data that exists in my database and presses an enter, which the application recognizes as a character, and so it receives the wrong return from the system.

That is why i am asking if i can use the number entry and block any character that isn’t a number

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 20, 2023, 2:54pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/6 "2023-04-20T14:54:28Z")

</div>

Yes, max and min length for text entry only work in forms.

You could count the length of the text entry using a “text lengh” column.  
Then on your button action, you set this logic:

IF, the data entered by user \> than your limit of character THEN show notifications “max characters X”.

Then to know if at has already been use, you can create a relation between the data submitted in the text entry by the user and you column where all the previous submitted data is stored. If the relation is empty then the user can submit, otherwise he needs to change.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 21, 2023, 12:21am UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/7 "2023-04-21T00:21:46Z")

</div>

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

Please look into building a custom form with Lucas’ suggestion above.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 24, 2023, 2:13pm UTC](https://community.glideapps.com/t/number-input-that-accepts-0-left/60762/8 "2023-04-24T14:13:50Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
