Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Dynamic text in "Maximum value" of numerical question.

  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 9 months ago #155540 by tammo
Would it be possible to have the current year as the maximum value in a numerical question? How would I configure that?

I need to have people filling in the year their house was built...

Thanks in advance,

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155552 by holch
I think this is rather a "Can I do this with Limesurvey" question than about "installation and update issues". So I'll move it to the correct forum.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago - 6 years 9 months ago #155565 by tpartner
Place this in the "Question validation equation" field:

Code:
this <= date('Y')

And, something like this in the "Question validation tip" field:

Code:
{if(this <= date('Y'), 'Okay', 'Try again!')}

Sample survey attached:

File Attachment:

File Name: limesurvey...6-06.lss
File Size:15 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 9 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose