Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Add PHPScript to Handle File Uploads

  • gattoun
  • gattoun's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #153263 by gattoun
Add PHPScript to Handle File Uploads was created by gattoun
I'm interested in writing a small script using PHPExcel to handle file upload question types. After a user uploads a .XLS file (this is the only type of file they'll be allowed to upload), I'd like to trigger a PHP script that writes some data from the Excel file to a database. I can figure out the logic for grabbing the data from the Excel file, but I'm not sure how to integrate with LimeSurvey. Where should I place the code to trigger after an Excel file upload?


Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155668 by DenisChenu
Replied by DenisChenu on topic Add PHPScript to Handle File Uploads
You can not do this when survey is submitted ?
When survey is submitted : use afterSurveyComplete event to do your php part.

Else : beforeSurveyPage : test if your question is in POST value when user goes next.

manual.limesurvey.org/Plugin_events

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose