Index: ITDynamic.php =================================================================== RCS file: /repository/pear/HTML_QuickForm/QuickForm/Renderer/ITDynamic.php,v retrieving revision 1.2 diff -u -r1.2 ITDynamic.php --- ITDynamic.php 3 May 2003 10:41:22 -0000 1.2 +++ ITDynamic.php 4 May 2003 13:51:52 -0000 @@ -95,8 +95,8 @@ function finishForm(&$form) { // display errors above form - if (!empty($this->_errors) && $this->_tpl->blockExists('qf_error_loop')) { - foreach ($this->_errors as $error) { + if (!empty($form->_errors) && $this->_tpl->blockExists('qf_error_loop')) { + foreach ($form->_errors as $error) { $this->_tpl->setVariable('qf_error', $error); $this->_tpl->parse('qf_error_loop'); } @@ -153,6 +153,7 @@ $this->_tpl->touchBlock($blockName . '_required'); } } + // Prepare multiple labels $labels = $element->getLabel(); if (is_array($labels)) { @@ -163,6 +164,17 @@ // render the element itself with its main label $this->_tpl->setVariable('qf_element', $element->toHtml()); if ($this->_tpl->placeholderExists('qf_label', $blockName)) { + $this->_tpl->setVariable('qf_label', $mainLabel); + } + + // Render any extra labels + if (is_array($labels)) { + foreach($labels as $key => $label) { + $thisKey = $key+2; + if ($this->_tpl->blockExists("qf_label_$thisKey")) { + $this->_tpl->setVariable("qf_label_$thisKey", $label); + } + } $this->_tpl->setVariable('qf_label', $mainLabel); } // render extra labels, if any