Welcome, Guest
Username: Password: Remember me

TOPIC: add response of survey

add response of survey 5 months 1 week ago #106696

  • ravi22
  • ravi22's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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: 5 months 1 week ago by ravi22.
The administrator has disabled public write access.

add response of survey 5 months 1 week ago #106700

  • c_schmitz
  • c_schmitz's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 755
  • Thank you received: 104
  • Karma: 88
Ravi, you have to use the column names of the result table.

So
array( columname1=>value1,
columname2=>value2)
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.
The following user(s) said Thank You: ravi22

add response of survey 5 months 1 week ago #106701

  • ravi22
  • ravi22's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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.
The administrator has disabled public write access.

add response of survey 5 months 1 week ago #106703

  • c_schmitz
  • c_schmitz's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 755
  • Thank you received: 104
  • Karma: 88
Yes, the database columnanme.
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.

add response of survey 5 months 1 week ago #106704

  • ravi22
  • ravi22's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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}}
The administrator has disabled public write access.

add response of survey 5 months 6 days ago #106705

  • c_schmitz
  • c_schmitz's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 755
  • Thank you received: 104
  • Karma: 88
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.
Support us, too. Donate to the LimeSurvey project and help keep us going!
Last Edit: 5 months 6 days ago by c_schmitz.
The administrator has disabled public write access.

add response of survey 5 months 6 days ago #106711

  • ravi22
  • ravi22's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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: 5 months 6 days ago by ravi22.
The administrator has disabled public write access.

add response of survey 5 months 6 days ago #106726

  • ravi22
  • ravi22's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Still finding problem in submitting response.
Unable to get what key i have to pass for successfully submission of answer.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.118 seconds
Donation Image