Welcome to the LimeSurvey Community Forum

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

Can I edit or add a question especially the question type using the LSRC API

  • siddharthhemnani.ad2b
  • siddharthhemnani.ad2b's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 3 days ago #266077 by siddharthhemnani.ad2b
Please help us help you and fill where relevant:
Your LimeSurvey version: url=https://www.limesurvey.org]LimeSurvey Cloud[/url] [url=https://siddharthhemnani-ad2b.limesurvey.net/questionAdministration/view?surveyid=654646&gid=1&qid=3#modalSystemInformation] Version 6.5.18 [/url
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template: general hobby based questionnaire
==================
I am trying to make a form where a user can rates a listed hobby as 'good' 'bad' 'no answer' and then can fill a free short text suggestion field which would contain another hobby. This hobby text is is unique and not spam then I would like to add this hobby also as a question which the next user can rate. so the next user can rate the previously listed hobby plus this new one.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 3 days ago #266087 by Joffm
So you have a question of type "array".
If you add further subquestions the database has to be changed. 

As you have to read the "new" hobbies and decide if it is unique ("swimming", "swim", "Swim" are all different) and useful - and not a "running louse" (a mention that will appear only once or twice) you may
  1. create as many subquestions as you expect useful hobbies.
  2. set all not precoded subquestions to hidden (by relevance)
  3. to enter a new hobby, enter the text and set the subquestion to visible.

This you can do in an activated survey.
But you can't change the structure of the database.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: siddharthhemnani.ad2b

Please Log in to join the conversation.

  • siddharthhemnani.ad2b
  • siddharthhemnani.ad2b's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 3 days ago #266088 by siddharthhemnani.ad2b
Thank you so much

The requirement is that I do not want to do this manually. What I had assumed after the first look at the List of all functions the main API page is that there would be add_question() or edit_question() function just like there is one for delete_question().
Currently the requirement is that this happens dynamically in a python script. I am using the requests library to make the method calls.
The idea is that the responses are captured within a view function in a Django project where the spam filtering and uniqueness is identified. If the response passes the checks then I save them in an SQLite DB and I had supposed that there would be add_question() or edit_question() function to which I can make a call using the remote client API and add this 'classified' suggestion as a subquestion. Since this is originally possible in active survey I wouldn't need any logic handling from my python backend

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose