We have a questionnaire which is concerned with a participant's activity over a seven day period.
The participant agrees to take part in our programme, and are enrolled. We create the participant record and token, with an additional attribute 'DateJoined'. This records the date they enrolled, which is likely to be different to the date we added them to LimeSurvey.
We then ask that the participant completes our questionnaire seven days after we enrolled them. We have a field called StartDate, and we need to validate this to ensure it is seven days after DateJoined. We also want to calculate EndDate, which would be six days after StartDate.
Is this possible?
For the EndDate, this works for calculating today's date + 1 week: Week ending: {date('d/m/Y' , time()+604800)} but I can't figure out how to adapt it to reference an existing field.
Any pointers as to how I might (a) validate the StartDate, and/or (b) calculate the EndDate, would be very, very much appreciated.
Something like this : {strtotime("now") > (strtotime(StartDate)+604800)} : to have a boolean
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.