protected function initForm($form) { $form->setDataSources(array($this->grid->getCompleteRequest())); $vars = array(); foreach ($this->grid->getVariablesList() as $k) { $vars[$this->grid->getId() . '_' . $k] = $this->grid->getRequest()->get($k, ""); } foreach (Am_Controller::getArrayOfInputHiddens($vars) as $name => $value) { $form->addHidden($name)->setValue($value); } }
public function renderConfirmationForm($btn = null, $addHtml = null) { $this->getForm(); $vars = $this->grid->getCompleteRequest()->toArray(); $vars[$this->grid->getId() . '_confirm'] = 'yes'; foreach ($vars as $k => $v) { if ($this->form->getElementsByName($k)) { unset($vars[$k]); } } foreach (Am_Controller::getArrayOfInputHiddens($vars) as $k => $v) { $this->form->addHidden($k)->setvalue($v); } $url_yes = $this->grid->makeUrl(null); $this->form->setAction($url_yes); echo $this->renderTitle(); echo (string) $this->form; }