Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: numerical input missing advanced options

numerical input missing advanced options 5 years 5 months ago #56418

  • avanoers
  • avanoers's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
I am trying to set the question so that one can not enter a negative number. So only number from 0 to 99 not -9 or some other negative value.
When I look at the documentation on this page:
docs.limesurvey.org/Question+type+-+Nume...ht=numerical%20input
I see way more options available.
I have included a screen shot of the options I have under advanced settings which do not include maximum and minimum values.
Any ideas how I can block the minus from being entered and only allow numbers?


I appreciate any help
Limesurvey Version 1.90+ Build 9642
The administrator has disabled public write access.

numerical input missing advanced options 5 years 5 months ago #56425

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6134
  • Thank you received: 1363
  • Karma: 535
I think maybe someone jumoed the gun a little with the documentation. I think some of those options are only available in 1.91+.

You can use the "Validation" field to control input. The following regular expression should limit the input to real number with no + or - sign allowed.
/^\d+(\.\d+)?$/
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: avanoers

numerical input missing advanced options 5 years 5 months ago #56428

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1327
  • Karma: 384
You have the possibility in 1.90+ to use multiple numerical input, and then max sum an min sum to achive what you want.

Hide tip cause tip show sum, and you you want only one value :)
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: avanoers

numerical input missing advanced options 5 years 5 months ago #57337

  • CarlSeiler
  • CarlSeiler's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
I'm also reading docs at docs.limesurvey.org/Question+type+-+Nume...ut#Advanced_settings and don't understand how I'm supposed to keep my numerical responses to integers between 0 and 17 (inclusive) to represent children's ages in whole years. The options don't match the docs, and I figure that I should be able to accomplish this with the Validation field, but I can't seem to find documentation on this. I haven't used regex in 20 years or so.

I'm using LimeService with 1.90+ it says.
The administrator has disabled public write access.

numerical input missing advanced options 5 years 5 months ago #57342

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
Which question type are you using?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

numerical input missing advanced options 5 years 5 months ago #57349

  • CarlSeiler
  • CarlSeiler's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Mazi wrote:
Which question type are you using?

Same as original poster. "Numerical input," and I see the same advanced options that avanoers is seeing. The docs seem to indicate that there are options such as "Integer only" and "Minimum value" etc. This thread (post #56425) indicates that you need to use regular expressions as those features are for 1.91.
The administrator has disabled public write access.

numerical input missing advanced options 5 years 5 months ago #57353

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
Regular expressions are one solution to this.

You can also switch to a multiple numerical question type and only list one answer option. Then you should also be able to set min/max at Limesurvey 1.87 or 1.90.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.311 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form