Welcome to the LimeSurvey Community Forum

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

Any Example to Get List from Shell Script?

  • sodiumchl
  • sodiumchl's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206563 by sodiumchl
I would like to run a shell script on the web server and use its output to fill the labels of a radio list. I'm thinking to use the beforeQuestionRender hook. Is there an example (php) for this? Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206595 by DenisChenu
Replied by DenisChenu on topic Any Example to Get List from Shell Script?
beforeQuestionRender can not be used with shell script : it happen each time a question is shown in HTML …

A shell script can update label in DB why not.

For "shell script" see manual.limesurvey.org/Plugin_events#CLI_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.
  • sodiumchl
  • sodiumchl's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #206681 by sodiumchl
Replied by sodiumchl on topic Any Example to Get List from Shell Script?
Thanks so much for your help. I am able to run shell scripts now, through
$output = shell_exec($shFile);

But getting the lines from $output to the options of a list question is still a challenge. I'm trying toolsDomDocument. If you have samples please give me some pointers.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose