Hi, I have a TEXT_FIELD which has its dataProvider set to a Double variable. When I use ‘#0’ in the format of the FIELD, it displays 0.0 and allows multiple decimal places to be entered inside the FIELD. Is there a way to limit user input to numerical values only without the decimal point?
Hi, is this functionality currently possible with Servoy?
I assume what you’re trying to do is limit the user to only entering integers?
You could make the dataprovider an integer!
Failing that, I don’t think so. Looking at the Servoy stack info information http://wiki.servoy.com/display/public/DOCS/Servoy+stack+info it seems that this functionality is provided by a jQuery masked input plugin from DigitalBush: http://digitalbush.com/projects/masked-input-plugin/ - maybe there’s more info there.
Your understanding is right. I have a textfield with a Double dataprovider and format set to “#0”.
This seems to be a limitation of Servoy. Thanks for the workaround!
I tried changing the dataprovider to Integer and Long but I can still enter a decimal point “.”, even though I set the format to ‘#0’. Is this a limitation? Any more ideas? Thanks.
there is currently no difference between integer/double input both use Decimalformat/NumberFormatter of java which allows certain chars like decimal and grouping chars
Thanks, Johan, for this.