Check out the LimeSurvey source code on GitHub!

Forward Users to Page that is Aware of Responses

More
5 years 2 months ago #70845 by thedead
Hi Everyone,

I know there is a way to upload files with Limesuvery; however I want to ask the user 40-50 questions and based on those responses forward the user to a separate page to upload 5-6 files.

This page would need to be need to know how they responded to the previous questions and only ask for certain files. I can handle the uploaded/file management. I need help on creating a function that can read the responses based on the user.

Please Log in to join the conversation.

More
5 years 2 months ago #70866 by tpartner
You can use JavaScript and {INSERTANS} to read the answers to previous questions and act accordingly.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 months ago #70870 by thedead
I was hoping to do have a custom page at the end of the survey that would be my own script, not another question page. That way I have complete control of the functionality. i.e. thankyou.php which means I wouldn't be able to use {INSERTANS}

Please Log in to join the conversation.

More
5 years 2 months ago #70873 by tpartner
In that case you can use the End URL and {INSERTANS} to pass the question values to your custom page - docs.limesurvey.org/Creating+a+new+surve...r+LimeSurvey#General

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 months ago #70882 by thedead
Thanks! That makes sense... one last question, if I wanted to pass all 50 responses to the end page, how can I do it? Seems pretty tedious to have them all passed through a GET

Please Log in to join the conversation.

More
5 years 2 months ago #70883 by tpartner
If you want to pass that many it may be easier to have your custom script query the DB directly. You can pass the {SAVEDID} and {SID} in the end URL.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 months ago #70886 by thedead
Is there a guide on how to pull the data properly?

Please Log in to join the conversation.

More
5 years 2 months ago #70888 by mdekker
Why not use the build in file upload question type and conditions to decide what upload question to ask?

---
Menno Dekker

Please Log in to join the conversation.

More
5 years 2 months ago #70889 by thedead
Well, I was going to build some sort of upload manager to track files...i.e. if based on the 50 questions, I needed file A to E, it may take them 4-5 days to get those files.

I wanted to be able to send them a link, and based off their survey responses show which files are required, and which ones they have uploaded.

So right after the survey, they upload file A and C. THen they would get a email saying they still need files B,D,E and they would have a link to click which shows they uploaded A & C but still need the missing ones.

Please Log in to join the conversation.

More
5 years 2 months ago #70890 by tpartner

Is there a guide on how to pull the data properly?

Not really but have a look at the code in statistics_user.php. You should be able to use something like that but add the SavedID to the query conditions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 months ago #70895 by thedead
Thanks - ill play around with it tonight and figure out how the data is queried.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form