Welcome, Guest
Username: Password: Remember me

TOPIC: How do I check previous answers in BeforeSurveyPage plugin event?

How do I check previous answers in BeforeSurveyPage plugin event? 3 months 4 days ago #110378

  • ralovera
  • ralovera's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
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?
The administrator has disabled public write access.

How do I check previous answers in BeforeSurveyPage plugin event? 3 months 4 days ago #110387

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6359
  • Thank you received: 824
  • Karma: 245
Hi,

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.

Denis
The administrator has disabled public write access.

How do I check previous answers in BeforeSurveyPage plugin event? 3 months 4 days ago #110398

  • ralovera
  • ralovera's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
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?
The administrator has disabled public write access.
Time to create page: 0.109 seconds
Donation Image