Welcome, Guest
Username: Password: Remember me

TOPIC: Load data from external Db into LimeSurvey based on a survey response

Load data from external Db into LimeSurvey based on a survey response 1 year 3 weeks ago #94280

  • lorenzo51
  • lorenzo51's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I need to fill in an answer with data uploaded from a DB table according to a previously user entered answer.
For example, the user enters a name and I automatically fill in the address field using data contained in a table with name and address.
I have read that is possible to use an Ajax call within the survey to dynamically call a PHP script which queries an external database and returns the results to the survey.
However, I'm not sure if this can solve my problem. If so, and given the fact that I'm not sure on how to proceed, I would kindly need some indication and/or example.
Many thanks in advance.
The administrator has disabled public write access.

Load data from external Db into LimeSurvey based on a survey response 1 year 2 weeks ago #94467

  • lorenzo51
  • lorenzo51's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I have managed to solve my problem by following the steps provided in Use autocomplete to populate several fields (LimeSurvey Documentation, section" Workarounds: Manipulating a survey at runtime using Javascript").
I have replaced the CSV file access with a PHP module that reads my DB table ad returns the resultset in a bidimensional array.
However, any further suggestion would be very welcome.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.090 seconds
Donation Image