Browse Source

ZF-6871: Allow setting id within Zend_Form_Decorator_Label

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21961 44c647ce-9c0f-0410-b52a-842ac1e357ba
alab 15 years ago
parent
commit
2a6ab69f23
1 changed files with 1 additions and 1 deletions
  1. 1 1
      library/Zend/Form/Decorator/Label.php

+ 1 - 1
library/Zend/Form/Decorator/Label.php

@@ -317,7 +317,7 @@ class Zend_Form_Decorator_Label extends Zend_Form_Decorator_Abstract
             require_once 'Zend/Form/Decorator/HtmlTag.php';
             require_once 'Zend/Form/Decorator/HtmlTag.php';
             $decorator = new Zend_Form_Decorator_HtmlTag();
             $decorator = new Zend_Form_Decorator_HtmlTag();
             $decorator->setOptions(array('tag' => $tag,
             $decorator->setOptions(array('tag' => $tag,
-                                         'id'  => $this->getElement()->getName() . '-label'));
+                                         'id'  => $id . '-label'));
 
 
             $label = $decorator->render($label);
             $label = $decorator->render($label);
         }
         }