# Text\_Field with NUMBER variable

**URL:** <https://forum.servoy.com/t/text-field-with-number-variable/13353>\
**Category:** Classic Servoy\
**Created:** [December 21, 2010, 11:24am UTC](https://forum.servoy.com/t/text-field-with-number-variable/13353 "2010-12-21T11:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janssenjos](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Janssenjos](https://forum.servoy.com/u/Janssenjos)\
**Post date:** [December 21, 2010, 11:24am UTC](https://forum.servoy.com/t/text-field-with-number-variable/13353/1 "2010-12-21T11:24:30Z")

</div>

Hi all,

I have the following problem with a Text\_Field with a form dataprovider named price(Number).  
The format of the text\_field is 0.00

When I enter the value 1.94 in the box, the variable price contains 1 instead of 1.94.  
But when I use a , instead of a . it does work. Then the variable price contains 1,94.

Is there a way to support both the . and the , as input in a text\_field?

Thanks.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 21, 2010, 11:42am UTC](https://forum.servoy.com/t/text-field-with-number-variable/13353/2 "2010-12-21T11:42:08Z")

</div>

both . and , seen as the decimal separator ?

No that is not possible in a plain number textfield. because the . and , are 2 different things.  
Depending on the locale (nl) . is the grouping and , is the decimal 1.000,10  
or (us) . is the decimal and , is the grouping 1,000.00

If you want to support just both then the quickest way to do it right now is to use a Converter on that field  
and tell servoy that the type is a String and then parse/convert it to a number the way you want.
