Welcome, Guest
Username: Password: Remember me

TOPIC: Can I set conditions on a date field?

Can I set conditions on a date field? 3 years 5 months ago #60813

  • cycas
  • cycas's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 11
  • Karma: 0
I'd like a question to appear if someone has filled in a date of birth field to indicate their child is less than four years old.

Can I do this with conditions (if so, how? Less than [date] doesn't seem to work? Or will I need to Javascript it? Any hints how to approach this gratefully received!
The administrator has disabled public write access.

Re: Can I set conditions on a date field? 3 years 5 months ago #60826

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
I think you'll need to use JavaScript.

If the questions are on the same page you could put a listener on the date question that compares the input date to todays date and then shows/hides/clears the subsequent question.

If the questions are on separate pages the listener could populate a hidden question that could then be used to control the subsequent question with conditions.

Either way the JS details would depend on your date format.
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.
Moderators: ITEd
Time to create page: 0.103 seconds
Donation Image