From LimeSurvey Manual

Revision as of 12:45, 6 November 2018 by Markusfluer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This event is fired just before the survey is activated.


The event receives the following information:

Name Type Description
surveyid integer The id of the current survey
simulate boolean -

Possible output

The following information can be set in the event:

Name Type Description
success boolean False will abort the activation
message string Error message to show. This will be shown independent of success
pluginFeedback string If set, will show this HTML instead of the default success feedback message


public function beforeSurveyActivate()
  $event = $this->getEvent();
  if ($this->checkSomeCondition())
    $event->set('success', false);
    $event->set('message', 'Can\'t activate survey - some condition is not met.');