I need the full id for javascript, now I have to use (in viewscript) tricky way as
$id = $this->form->getSubForm('foo')->getName() . '-' . $this->form->getSubForm('foo')->getElement('myElement')->getId(); I think the right way is to create new method: eg. getFullyQualifiedId() Jurian Sluiman wrote: > > Op Thursday 10 September 2009 11:42:05 schreef Václav Vaník: >> Hi, >> >> I see now, if I have an element in subform (ZF 1.9.2), getId() method >> returns only partial id, it means id is not in subformName-elementName >> style. >> >> In 1.8.2 version is id correct. Is it a bug or new feature? > > Hi, > Using blame to determine the changed lines in svn, Matthew committed at > 09/07/08 the most recent changes from the Zend_Form_Element::getId() > method. > The message from the commit is: > >> r20...@zlaptop: matthew | 2008-07-09 12:42:51 -0400 >> ZF-3567: add getFullyQualifiedName() and getId() methods to form objects >> * Added getFullyQualifiedName() and getId() methods >> * Updated decorators to reference the above > > Having a look at issue ZF-3567 > (http://framework.zend.com/issues/browse/ZF-3567), perhaps the bug was > introduced solving this issue? You can ask Matthew more about this. > > Regards, Jurian > -- > Jurian Sluiman > Soflomo.com > > > > -- View this message in context: http://www.nabble.com/SubForm-and-Element%3A%3AgetId%28%29-tp25380250p25468860.html Sent from the Zend Framework mailing list archive at Nabble.com.