We're using LimeSurvey's JSON RPC API for automatically creating surveys with a Python script. The script is generating surveys and question groups, importing questions in lsq format. Basically it's working perfectly fine, except of one thing: default values for questions.
For instance, the script is generating a list of checkboxes (multiple choice) and some of these checkboxes shall be checked by default. So the script is adding some "default values" lines to the lsq, e.g.:
Code:
<defaultvalues>
<fields>
<fieldname>qid</fieldname>
<fieldname>scale_id</fieldname>
<fieldname>sqid</fieldname>
<fieldname>language</fieldname>
<fieldname>specialtype</fieldname>
<fieldname>defaultvalue</fieldname>
</fields>
<rows>
<row>
<qid><![CDATA[2000]]></qid>
<scale_id><![CDATA[0]]></scale_id>
<sqid><![CDATA[2002]]></sqid>
<language><![CDATA[de]]></language>
<specialtype/>
<defaultvalue><![CDATA[Y]]></defaultvalue>
</row>
</rows>
</defaultvalues>
Even though the listed IDs match the IDs of the question, the checkboxes are not marked. Even if I'm creating a question in the Web interface of LimeSurvey, exporting it and then finally importing its lsq, default values are not set: no checkbox is checked by default.
Can anybody give me a hint how default values can be defined when generating surveys via API?
Thanks a lot for any advice in advance!