Pass responses to END URL

More
3 years 7 months ago #112252 by iosononando3
iosononando3 created the topic: Pass responses to END URL
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 ;)

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #112394 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!