# How to make text input shows numbers only?

**URL:** <https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner\
**Created:** [August 6, 2020, 10:56am UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785 "2020-08-06T10:56:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 10:56am UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/1 "2020-08-06T10:56:20Z")

</div>

Hi, I’m making a calculator and the way to input texts in the “text\_input 1” is clicking the buttons, I made 3 buttons which are “C” “0” and “E”. So now when I click the buttons accordingly, the text input box will become “C0E”. But I want numbers only in the text input box. What should I do? Thanks.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/c/6cd05a1b4ec4241f3966244a5b4bc80b5287dd83.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 6, 2020, 11:45am UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/2 "2020-08-06T11:45:21Z")

</div>

Hi

Select the appropriate keyboard type for the field on the Adwanced tab

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/0/30f8a01e6d61546da3e281fea4b7a2f58003649f.png)

---

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 11:47am UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/3 "2020-08-06T11:47:09Z")

</div>

Hi, thanks for your reply, I mean when I press the button, the “text input” inputs numbers only.  
For example if I press “C” , “2” and “1”, the text input result should be “21” only.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/2/2205fcaa237cea2d7c2472b7bfdc1c89f54e6296.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 6, 2020, 11:58am UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/4 "2020-08-06T11:58:22Z")

</div>

Clear. Create the string 0123456789 and check whether it matches. If a character is included in this string, add it to the output string

---

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 12:02pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/5 "2020-08-06T12:02:44Z")

</div>

May I know how to do that? I’m sorry I’m new to Thunkable. Thanks again.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 6, 2020, 12:13pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/6 "2020-08-06T12:13:22Z")

</div>

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ffdf028558e2eedc3e3bb88253d4a20ae0488738.png)

---

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 12:22pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/7 "2020-08-06T12:22:14Z")

</div>

It shows this when I press “C” button (My “C” button is Button 1)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/2/3209dd01385d07f51355ee929dc1067a509f5789.png)

---

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 12:52pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/8 "2020-08-06T12:52:02Z")

</div>

I noticed that I did something wrong with the blocks you screenshot to me and I redone it. When I press button 1 the text input is cleared and shows “C” instead. But what I want is the “C” and “E” will not append their text into the text input box when their respective button is clicked

Btw this is the blocks and result after i press “C” (regardless what button I pressed before pressing “C”, it shows the same result)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/57e23b2c5a13ec22063698091ceebf6eb0813a6e.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d708ae1ab9dbf7531e25a5492b2fc213d9d72219.png)

---

<div class="post-metadata">

**Author:** ![Thunkab0y](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thunkab0y](https://community.thunkable.com/u/Thunkab0y)\
**Post date:** [August 6, 2020, 1:44pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/9 "2020-08-06T13:44:06Z")

</div>

I added this (From “button” “component” get “Text” ≥ 0) and it worked, but thanks for your help too 🙂

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1fde7383083bb002457d74f3490c24b27a0523dc.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:26pm UTC](https://community.thunkable.com/t/how-to-make-text-input-shows-numbers-only/723785/10 "2024-11-08T12:26:49Z")

</div>


