Add PHPScript to Handle File Uploads

More
4 months 4 weeks ago #153263 by gattoun
gattoun created the topic: Add PHPScript to Handle File Uploads
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!

Please Log in to join the conversation.

More
3 months 2 weeks ago #155668 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LouisGac

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now