|
|||
|
Decorators with Zend_Form
just turned to zend framework recently. im java programmer, who code php + zend in my spare time. The article describe how to add decorators to a zend form. Im one of those who don't like the default - cause im trying to port my existing homepage, and ... css is time consuming. but it also describes how to use view script with zend forms - gives you 100% control. Nice - lets begin. Made a login form - its a rip off from a tutorial, but this is how I used quickform from pear also, so its kinda familiar. LoginForm.php PHP Code:
This confuses me, cause I haven't managed to understand what Im doing here, and what parameters I set. setDecorators, removes all existing decorators, and takes an array of decorators ... and I specify it is an ViewScript .. ok ... script is for??? and the form ofc ... But i get an exception error, saying: Warning: No view script registered with ViewScript decorator in C:\www\webroot\zftutorial150\library\Zend\Form.php on line 2179 I have a feeling that the form has to know the path to the viewscript ... or ... Im kinda confused cause alot seems to work without any configuration, if not you got to configure stuff ... but how and when ... Reference doc is confusing, api doc is microscopic My view script... loginForm.phtml PHP Code:
PHP Code:
|
|
|||
|
I'm having the same issue but I have yet to see it explained anywhere.
The only difference in my code is that in the .phtml I use "form" instead of "login" as suggested by the tutorials. PHP Code:
|
|
|||
|
Hi folks,
I had the same problem and it is a little tricky to spot: 'script' has to be 'viewScript'. PHP Code:
PHP Code:
Zend Framework: Documentation Hope this helps! Valdeva |
|
|||
|
I've been having problems with this also, the viewscript doesn't crash out and I can get the getAction() and getMethod() functions when in the script.
However the elements of my form do not render. I use the following code: PHP Code:
Here is the element within my Form code: PHP Code:
Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
|
|