Welcome, Guest
Username: Password: Remember me

TOPIC: numerical input missing advanced options

numerical input missing advanced options 3 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?
numerical-input.jpg


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

Re: numerical input missing advanced options 3 years 5 months ago #56425

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4068
  • Thank you received: 746
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: avanoers

Re: numerical input missing advanced options 3 years 5 months ago #56428

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6219
  • Thank you received: 791
  • Karma: 238
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 :)
The administrator has disabled public write access.
The following user(s) said Thank You: avanoers

Re: numerical input missing advanced options 3 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.

Re: numerical input missing advanced options 3 years 5 months ago #57342

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
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.

Re: numerical input missing advanced options 3 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.

Re: numerical input missing advanced options 3 years 5 months ago #57353

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
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.132 seconds
Donation Image