- Posts: 17
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago #176302
by BaranD
Populate answer fields of certain questions with the API was created 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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 5 months ago #176318
by DenisChenu
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.
Replied by DenisChenu on topic Populate answer fields of certain questions with the API
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 0
5 years 5 months ago #176321
by BaranD
Replied by BaranD on topic Populate answer fields of certain questions with the API
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?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 years 5 months ago - 5 years 5 months ago #176339
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Populate answer fields of certain questions with the API
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 5 months ago by tpartner.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 5 months ago - 5 years 5 months ago #176344
by DenisChenu
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.
Replied by DenisChenu on topic Populate answer fields of certain questions with the API
a : it's an array. It's the attribute of response.
Example :
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 5 months ago by DenisChenu.
The topic has been locked.