Welcome to the LimeSurvey Community Forum

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

Pass responses to END URL

  • iosononando3
  • iosononando3's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #112252 by iosononando3
Pass responses to END URL was created by iosononando3
Hi everybody,
I am trying to set up a survey in which users are automatically directed to an END URL after submission. In the new page I need to present them with different options based on their responses. For example, if the user selected option 1 in question 6, I would give them a certain message, while if they selected option 2, a different message would appear (this is only a silly example that illustrates my intentions... the actual thing will be more complicated).

I've seen in the forums that one can pass parameters via URL (for accessing them via the GET method), but in my case this would be veeeeery insecure.

My question is: is there an easy(ish) way to pass responses (preferably all of them) to the END URL via POST method, or via SESSION? If yes... how?

Thanks a lot!!! :laugh:


PS: I know I could create a new form in "completed.pstpl" that sends the data to the new URL, but that would require users to submit the information two times :S . That is not ideal

PS2: I don't think creating an app that connects to the database and checks for the last response (or that compares it with a token in the SESSION) is a good solution either. I am running LS on a shared server... the less I interact with the database, the better ;)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 6 months ago #112394 by DenisChenu
Replied by DenisChenu on topic Pass responses to END URL

My question is: is there an easy(ish) way to pass responses (preferably all of them) to the END URL via POST method, or via SESSION? If yes... how?

You can use jquery.ajax for this

But $_POST value is not secure too ....

If you survey use token: the most secure is to use {SRID} and {TOKEN} in the end url. ANd to call DB in your own script.

Alternatively, you can do a plugin using afterSurveyComplete event.

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.

Lime-years ahead

Online-surveys for every purse and purpose