Limit size of numeric fields in widget geoprocessing with javascript mask

338
0
12-15-2016 07:52 AM
Labels (1)
GilbertoMatos
Occasional Contributor II

Hello!

I need to limit the size of the longitude and latitude fields of a geoprocessing widget I have customized. I need to have a maximum of 6 decimal places, and only typing numbers, comma, and the hyphen character should be allowed.

I tried to use a javascript function that I developed, but I can not run it inside the widget, such as onkeypress = "myFunction ()". I always get an invalid template error message.

I've also tried using the code below, but it does not limit the amount of characters at the time of typing, ie I need to block typing the seventh decimal place.

Any tips on how I can do this?

Thank you!
Gilberto.

0 Kudos
0 Replies