- Posts: 34
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
[v2] - integer validation with no decimals
- mfiora
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
4 years 8 months ago #186165
by mfiora
[v2] - integer validation with no decimals was created by mfiora
Hello,
i have a problem with an Array numbers question in the latest release of version 2.
Basically i need the answer to be an integer with no points and no commas.
If i set as a subquestion validation
it allows me to type: 600.000 in the answer and it becomes 600,000.
So i tried with a
and i still get same behaviour.
How can i solve?
Thanks,
Regards,
i have a problem with an Array numbers question in the latest release of version 2.
Basically i need the answer to be an integer with no points and no commas.
If i set as a subquestion validation
Code:
is_int(self)
So i tried with a
Code:
regexMatch('/^[0-9]{1,15}$/',self)
How can i solve?
Thanks,
Regards,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 8 months ago #186169
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic [v2] - integer validation with no decimals
in subquestion validation : it must me is_int(this) in my opinion.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- mfiora
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 34
- Thank you received: 3
4 years 8 months ago #186173
by mfiora
Replied by mfiora on topic [v2] - integer validation with no decimals
Hello DenisChenu,
i tried that and still if i input 100.000 it changes to 100,000.
Is there a way to block or delete "," and "."?
Thanks,
Regards,
i tried that and still if i input 100.000 it changes to 100,000.
Is there a way to block or delete "," and "."?
Thanks,
Regards,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 8 months ago #186181
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic [v2] - integer validation with no decimals
What do you want exactly ?
You can disable the auto correction of number input in Theme option : maybe it's what you need ?
PS : i think 100.000 changes to 100,000 is a bug and can be reported : www.limesurvey.org/community/bug-tracker (integer or not)
You can disable the auto correction of number input in Theme option : maybe it's what you need ?
PS : i think 100.000 changes to 100,000 is a bug and can be reported : www.limesurvey.org/community/bug-tracker (integer or not)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- mfiora
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 34
- Thank you received: 3
4 years 8 months ago #186187
by mfiora
Replied by mfiora on topic [v2] - integer validation with no decimals
Hello Denis,
thanks for your reply. Probably disabling the autocorrection of the number input could help me but i don't seem to find "Theme Option".
Could you please help me find it?
Thanks,
thanks for your reply. Probably disabling the autocorrection of the number input could help me but i don't seem to find "Theme Option".
Could you please help me find it?
Thanks,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 8 months ago #186190
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic [v2] - integer validation with no decimals
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Attachments:
The topic has been locked.
- mfiora
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 34
- Thank you received: 3
4 years 8 months ago #186193
by mfiora
Replied by mfiora on topic [v2] - integer validation with no decimals
Hello,
use Version 2.73.1. i don't think i have that screen.
Thanks,
Regards,
use Version 2.73.1. i don't think i have that screen.
Thanks,
Regards,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 8 months ago #186198
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic [v2] - integer validation with no decimals
2.73.1 : no theme …
You can try adding
In group description
You can try adding
Code:
<script> LSvar.bFixNumAuto=0; bFixNumAuto=0; </script>
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- mfiora
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 34
- Thank you received: 3
4 years 8 months ago #186199
by mfiora
Replied by mfiora on topic [v2] - integer validation with no decimals
Hello DenisChenu,
thanks for your reply. With your hint it does not autocorrect the value. But i would like the question to give a warning when a "." or a "," is inserted. At the moment both are allowed and give no warning even if i use regexMatch.
Thanks,
Regards,
thanks for your reply. With your hint it does not autocorrect the value. But i would like the question to give a warning when a "." or a "," is inserted. At the moment both are allowed and give no warning even if i use regexMatch.
Thanks,
Regards,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 8 months ago #186204
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic [v2] - integer validation with no decimals
Seems bNumRealValue is broken in 2.73 version …
Workaround : use array of text (i use it in 3.X when need numeric with sepearator …).
Workaround : use array of text (i use it in 3.X when need numeric with sepearator …).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.