2008年9月25日星期四

Re: [fw-mvc] Zend_Form_Decorator_ViewScript

$this->element is the way to go. If you don't like it too much (like I do)
In the beginning of your script you can do:
<? $form = $this->element
/* @var $form Zend_Form */
?>

Using this you'll event get autocompletion if using a nice IDE.

Regards,
Emil Ivanov

2008/9/25 Nayef Abu Ebaid <nayefae@gmail.com>

Hi Matthew,

Thanks for your help, the ViewScript works now, but now I am not able to
access the form object in the view script, in my Viewscript I use
$form->getName(); but get this error  (Fatal error: Call to a member
function getName() on a non-object), but when I use
$this->element->getName(); it works. what is the right way to access the
object and it elements.

Thanks in advance.

Nayef Abu Ebaid
Senior PHP Developer, Zend PHP5 Engineer, MySQL Certified Developer
Maktoob Group
email: nayefae@gmail.com
--
View this message in context: http://www.nabble.com/Zend_Form_Decorator_ViewScript-tp19638477p19664837.html
Sent from the Zend MVC mailing list archive at Nabble.com.




--
My place to share my ideas:
http://vladev.blogspot.com
http://carutoo.com

没有评论: