get("Survey", array("uid" => $_POST['objectUid'])); if (!empty($surveyResults)) { $this->loadedSurvey = $surveyResults[0]; } else { die("No surveys found!"); } } else { die("Incorrect or null uid passed!"); } } public function init() { $questionString = ""; foreach ($this->loadedSurvey->questions as $question) { $questionString .= $question->code . ","; } // echo the HTML markup to display the editor on the screen ?>