# How to specify a text input to be a number?

**URL:** <https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980>\
**Category:** Questions about Thunkable X\
**Created:** [March 2, 2023, 10:41pm UTC](https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980 "2023-03-02T22:41:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jemm971](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jemm971](https://community.thunkable.com/u/jemm971)\
**Post date:** [March 2, 2023, 10:41pm UTC](https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980/1 "2023-03-02T22:41:37Z")

</div>

Hello,  
i just tried Thunkable, and I wanted to have an input field to select a number.  
But I only find a Text Input field. And in blocks, no function to convert a text into a number or to control if an entry is a number or not.  
Is it possible to do that?  
Thanks

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 3, 2023, 3:57am UTC](https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980/2 "2023-03-03T03:57:03Z")

</div>

If the user types in a number, you can convert it from text to numeric value by adding zero to the text string.

It’s possible to check if the string contains any alphabetical or symbol characters but it’s kind of a pain to do so.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 3, 2023, 6:20am UTC](https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980/3 "2023-03-03T06:20:01Z")

</div>

To check for a number multiply the entered text by any number. If the result is **NaN** then the entered value has at least one non numeric character in it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 1, 2023, 6:20am UTC](https://community.thunkable.com/t/how-to-specify-a-text-input-to-be-a-number/2304980/4 "2023-06-01T06:20:50Z")

</div>

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