Welcome to the LimeSurvey Community Forum

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

Populate answer fields of certain questions with the API

  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #176302 by BaranD
Hello,

Which method(s) of the API are needed to populate fields of a survey that is being filled in. So that the employee does not need to fill out all the fields.

F.e. user wants to fill the survey for a certain building and presses on a button from an external application. The button will send a Http based request to limesurvey to create a response for a survey and populates certain answer fields.

I hope that it is possible

Kind regards,

Baran
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176318 by DenisChenu
2 solution :
1 : usage of token (and token response persisance)
- API : create token : api.limesurvey.org/classes/remotecontrol...hod_add_participants
- API : create related response : api.limesurvey.org/classes/remotecontrol...#method_add_response
- Link with token
2. Usage of included manual.limesurvey.org/URL_fields#Start_URL without token.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #176321 by BaranD
Hello DenisChenu,

I have succesfully created a token, but I do not know how to create related response and have it linked with the token.

Where can I also read about how the exact syntax of the $aResponseData parameter is which I have to fill for the create related response method?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #176339 by tpartner
Did you try searching the forum for "aResponseData"?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 4 months ago by tpartner.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #176344 by DenisChenu
a : it's an array. It's the attribute of response.

Example :
Code:
$aResponse = array('token'=>'sqdqsgdh','12345X1234X12345'=>'toto','12345X1234X12346'=>'titi')

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose