Can we set a limit on Integer Input Variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 12:29 PM
Hi,
I have a field on my custom form called working days. It is an Integer type variable. I have to restrict it to be put between 220 - 365.
Is there any way to be able to set a limit on Integer input variables? We can restrict the input by OnChange Client Script but is there any other fundamental way to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 07:46 AM
Hi Chuck,
Thanks for the above. The same still happens with the new parseInt statement.
Is there a way to restrict the string field to only allow numbers?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 07:54 AM
Hi Sam,
The string field would still have to do the parseInt() to convert the string value to the numeric value. You could use a RegEx to detect and warn that non numeric values were used, but it would be after they leave the field when the onChange script is triggered. There's no way to do it inline to prevent non-numeric characters from being entered.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 01:19 PM
You can do this by using a UI macro where you can select your input type as number and select min and max values, and add that on to the form