Welcome to the LimeSurvey Community Forum

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

How do I add a question directly to a .lss file?

  • rumtscho
  • rumtscho's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #112159 by rumtscho
I want to produce a survey with a fairly regular structure which is too complicated to be done using the UI tools directly. So I thought I could export a skeleton survey, add a few questions to the .lss file, and import it into a new survey.

What I did was to go into the place where my question is, then copy and paste the whole <row> element. Then I changed following elements in my new row: <qid> (I used a new integer not already contained in the file), <title> (again giving it a unique value), <question>, and <sortorder> (incrementing the value of the question above and making sure the next questions in the section have the correct order). Both question share the same type (a list of three radio buttons).

Then I went to where the answers are, and copy-pasted three existing rows. There I changed the <qid> (to point to my new question) and the <answer>.

I imported the file to a new survey. There were no error messages, and when I test-start the survey, it says that the survey has 11 questions, whereas the skeleton survey had 10 questions. But in the section where I added my new question, I only see the old questions, created by clicking in the interface.

What did I miss, and how do I edit the .lss to add a new question?
The topic has been locked.
More
9 years 6 months ago #112161 by Ben_V
I think you can get trouble "inventing" new question and group IDs

Another approach is using TSV files for import/export instead .lss

Check the manual and this discussion (.txt attached file) ;)
.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose