QuickForm: allow for named hints

This is necessary as I want to refer to them in display groups
This commit is contained in:
Thomas Gelf 2016-03-21 19:08:21 +01:00
parent 09bfcd3bff
commit 75f8872962
1 changed files with 7 additions and 1 deletions

View File

@ -245,7 +245,13 @@ abstract class QuickForm extends Zend_Form
public function addHtml($html, $options = array())
{
$name = '_HINT' . ++$this->hintCount;
if (array_key_exists('name', $options)) {
$name = $options['name'];
unset($options['name']);
} else {
$name = '_HINT' . ++$this->hintCount;
}
$this->addElement('simpleNote', $name, $options);
$this->getElement($name)
->setValue($html)