How do I check previous answers in BeforeSurveyPage plugin event?

2 years 8 months ago #110378 by ralovera
I need to process the answers after the respondent submits the form for every question group.

The BeforeSurveyPage event only receives the survey ID.

How do I check the answers for the question group before the group that will be displayed after this event?

Please Log in to join the conversation.

2 years 8 months ago #110387 by DenisChenu

In beforeSurveyäge, you can know what Step is call and What question are updated (with Yii getPost).

But maybe you're rigth, we need an afterSUrveyPage with more information. But seems difficult to send whole information.

Maybe a way to send content of the page, and allow to update content too is a good solution. Need a lot f work to be included in LS plugin event like that.

A question for feature request.


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).

Please Log in to join the conversation.

2 years 8 months ago #110398 by ralovera
Thanks and yes I think an afterSurveyPage event that receives all the fieldnames and answers would be better.

I'm trying to check the answers after form submit, do logic at server side and open an end URL that's different from the one assigned to the survey if the respondent is screened out by the logic.

Basically, I'm trying to do custom screen out logic every time the respondent submits a form in the survey.

If I can get the fieldnames of the submitted question group using getPost, then I could check all the respondent's answers at that point and do the logic.

Also, what is Step?

Please Log in to join the conversation.