QuickForm: add getSentValue() helper method

This commit is contained in:
Thomas Gelf 2015-07-28 11:48:42 +02:00
parent 4a1cdd093c
commit fa8dbaadfc
1 changed files with 11 additions and 0 deletions

View File

@ -97,6 +97,17 @@ abstract class QuickForm extends Zend_Form
$this->getElement(self::ID)->setIgnore(true);
}
protected function getSentValue($name, $default = null)
{
$request = $this->getRequest();
if ($request->isPost()) {
return $request->getPost($name);
} else {
return $default;
}
}
public function getSubmitLabel()
{
if ($this->submitLabel === null) {