We are currently working on a survey where users are asked what the Best Before date of certain products are. This is to remove them once expired. We've populated the survey with all questions, but we need to figure out how to use the Best Before Dates from Response A as input for the next time someone takes the survey. Is this possible?
If I get you right, you know the respondents already and would send out a link later based on your database. You could simply send out a link with URL parameter that prefills a new (if you want, hidden) question in your next survey.
In other words: when you invite them next time with tokens from participant table, make the link from your old responses like this:
From one response you can not access answers to other responses directly from Limesurvey. You might need to create a ajax call directly to the database.
Or if this is feasible for you, pass the answer from the current response via end url to the next response. But I didn't really understand what you are actually trying to achieve, so it is difficult to tell.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
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.
I've linked to the survey within a phone app, this is where someone sees the products in a list with input fields for the Best Before Date, Let's say Bob opens the app and fills in what date it is, he then checks the Best Before Date of the peanut butter, which is 1-1-2020 and fills this into the field and submits the survey.
Tom opens the app on 1-1-2020 and needs to be shown that he needs to check the peanut butter because the Best Before Date is almost expired. Both of them use the same account/token to access the survey.
Bob --> Best Before Date of Peanut Butter --> Submit survey --> data gets stored in the database
--> Tom opens survey with the same token and is already presented with the dates Bob had filled in, but only the dates that are the same as the date filled in at the start of the survey.
Q1 - What date is it tomorrow?
Q2 - Best before date of +200 products (subquestions with input other than the same value as Q1 get hidden)