add response of survey

More
3 years 1 month ago - 3 years 1 month ago #106696 by ravi22
ravi22 created the topic: add response of survey
I am developing lime survey in android app and displayed survey successfully,but now facing problem in add response of survey.
Is there any structure for submitting all types of survey answers.

As document suggest to add response in format -
sSessionKey (string) - The session key
iSurveyID (integer) - The survey id
aResponseData (array) - array/structure containing your response data

so my question is what the structure for aResponseData (array) , so it properly store in lime survey database.
Last Edit: 3 years 1 month ago by ravi22.

Please Log in to join the conversation.

More
3 years 1 month ago #106700 by c_schmitz
c_schmitz replied the topic: add response of survey
Ravi, you have to use the column names of the result table.

So
array( columname1=>value1,
columname2=>value2)

Best regards

Carsten Schmitz
LimeSurvey project leader
The following user(s) said Thank You: ravi22

Please Log in to join the conversation.

More
3 years 1 month ago #106701 by ravi22
ravi22 replied the topic: add response of survey
Thanks for your reply, can you please explain what do you mean by columname1 columname2.is it database columname or something else.
Suppose i have a survey in which i have only one question of type -'5', so what the array for it.

Please Log in to join the conversation.

More
3 years 1 month ago #106703 by c_schmitz
c_schmitz replied the topic: add response of survey
Yes, the database columnanme.

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
3 years 1 month ago #106704 by ravi22
ravi22 replied the topic: add response of survey
In my survey there is only one question of type 5, and response of list_questions method is -
{"error":null,"id":1,
"result":[{"type":"5","id":{"qid":"1000","language":"en"},
"title":"Q001","question":"Select One form list?"}]}

so what column name i have to use for submitting response of it.
Currently i am submitting answer like this but getting blank in response-
{"method":"add_response","params":{"iSurveyID ":surveyId,"aResponseData":[{"answer":"5","type":"5"}],"sSessionKey ":mySessionKey}}

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #106705 by c_schmitz
c_schmitz replied the topic: add response of survey
It is the column names of the table where the responses are stored.
So look at the column names of the lime_survey_<your_survey_id> result table.

Best regards

Carsten Schmitz
LimeSurvey project leader
Last Edit: 3 years 1 month ago by c_schmitz.

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #106711 by ravi22
ravi22 replied the topic: add response of survey
Not getting,from where i can see table structure.
from below URL
limesurvey-dev.bdwarf.org/index.php/admi...se/surveyid/SURVEYID i can see responses on html but how can i see database tables.
Last Edit: 3 years 1 month ago by ravi22.

Please Log in to join the conversation.

More
3 years 1 month ago #106726 by ravi22
ravi22 replied the topic: add response of survey
Still finding problem in submitting response.
Unable to get what key i have to pass for successfully submission of answer.

Please Log in to join the conversation.

More
1 year 11 months ago #121436 by garvsaxena
garvsaxena replied the topic: add response of survey
Hey everyone, Can anyone tell me that in which file I can get the insert query for saving the users responces into the database???

Please Log in to join the conversation.

More
1 year 11 months ago #121449 by Mazi
Mazi replied the topic: add response of survey

garvsaxena wrote: Hey everyone, Can anyone tell me that in which file I can get the insert query for saving the users responces into the database???

No cross-posting please: www.limesurvey.org/en/community-services...n-lime-survey#121401


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now