Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
The AfterSurveyComplete event is not a plugin, it is an event that you could use in a plugin that you still have to write. So these are two different approaches to be able to do "something" after a survey is complete. Sometimes the end url calling an external script can do the trick, but in many cases it might not work and you need to go with the event mentioned by Denis.
Without know what you are trying to do at the end of the survey, we can only say what is there, but can not give any tips what would be best.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
I think this can be done with the end url, depending on the target system. You can use Expression Manager in the end URL and you can pass on variables through this feature dynamically to your other system. But of course, you might not want to show the respondent the redirect, then you might have to do it differntly.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Ok, I think I understood, until now I had not used expression manager .. I was just reading a little, it seems super fast to solve it this way, although I still did not find what the name of the variables would be {sid} .. and the other I have to read the documentation more.
You can place the AJAX call in the survey end message instead of the theme TWIG file. That way you have direct access to the survey ID - "{SID}" - and the response ID - {SAVEDID} or {TOKEN}.
If placing it in submit.twig, try:
Code:
{{ processString('{SID}')}}
Code:
{{ processString('{SAVEDID}')}}
Code:
{{ processString('{TOKEN}')}}
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.