From 75f8872962b654e2e7b27b2022dcbf20a2222be9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 21 Mar 2016 19:08:21 +0100 Subject: [PATCH] QuickForm: allow for named hints This is necessary as I want to refer to them in display groups --- library/Director/Web/Form/QuickForm.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index c512b5c9..e81fb2a4 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -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)