Array (Numbers) -- force integers for numeric input

More
5 months 4 weeks ago #167569 by blocka
blocka created the topic: Array (Numbers) -- force integers for numeric input
I'm using Array (Numbers) to enable the input of a small multi-year budget.

I want to either force rounding up on all numbers inputted when the user exits an input box, or restrict all numeric input to integers only.

Is there a way to do this?

Please Log in or Create an account to join the conversation.

More
5 months 4 weeks ago #167574 by Joffm
Joffm replied the topic: Array (Numbers) -- force integers for numeric input
Hi, blocka,

two quick ideas:
subquestion validation with

regular expression : is_empty(this) or regexMatch('/^\d{1,5}$/',this)
function "is_int(x)": is_empty(this) or is_int(this)

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: blocka

Please Log in or Create an account to join the conversation.

More
5 months 4 weeks ago #167580 by blocka
blocka replied the topic: Array (Numbers) -- force integers for numeric input
Awesome! Both work nicely

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!