public function executeShowWidget(dmWebRequest $request) { $form = new PluginCommentForm(); if ($request->isMethod('post') && ($data = $request->getParameter($form->getName()))) { if ($form->isCaptchaEnabled()) { $data = array_merge($data, array('captcha' => array('recaptcha_challenge_field' => $request->getParameter('recaptcha_challenge_field'), 'recaptcha_response_field' => $request->getParameter('recaptcha_response_field')))); } $form->bind($data); if ($form->isValid()) { $form->save(); $this->getUser()->setFlash('form_saved', true); $this->redirectBack(); } } $this->forms['PluginComment'] = $form; }