I would like to ask if there is a way to auto populate a date field that is hidden so that when I view the statistics a date field would appear under response filters?
Hi,
Unfortunately I was not successfull in entering something dynamic into the default answer option,
I used an equation to populate the date question.
Both hidden:
1. equation: {MyDate=date("Y-m-d")}
2. Hidden date question with code "MyDate"
And you have a date field in the response filter
Joffm
If you are going to populate with some other than the actual date, please tell us.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
For default value : {date("Y-m-d")} for date of today
With all data format. Since default value is set in PHP : must be SQL date
For another day/date : play with strtotime is the most easy.
For example : {date("Y-m-d",strtotime("tomorrow"))}
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Last edit: 5 years 9 months ago by DenisChenu. Reason: {date("Y-m-d",strtotime("tomorrow"))}
However, after trying it, the statistics shows the date (just like in the photo above) but why doesn't it save the date in the date field when I view it under survey responses.