Changing default value of a question via remote API

More
1 month 2 weeks ago #196532 by oledole
Hi.

So I have a survey with a multiple choice (type M) question where the user can check one or more values from the choices they have.

I have an app that creates new survey by copying this. On this app, they have a multiple choice menu just like in the survey.

What I want to achieve is that the choices selected in the app is automatically selected in the survey. I wanted to do this through the remote API, but I cannot figure out how to change the default value of a question/subquestion.

I tried with a call in postman.

{
"method": "set_question_properties",
"params": [
"VeO6jp8HEFifdigxg705jnZRir7A6qCl", <-- Token
"61915" <-- subquestion ID,
{
"title": "SQ002"
}
],
"id": 1
}

This works. I get back:

{"id":1,"result":{"title":true},"error":null}

But I cannot find out what to use (instead of title) to change the default value. I tried with defaultvalue, answers, answeroptions, available_answers, but I always get back:

{"id":1,"result":{"status":"No valid Data"},"error":null}

Is it possible? And if so, how can I do it?

Please Log in to join the conversation.

LimeSurvey Partners

Start now!

Just create your account and start using Limesurvey today.

Register now