On Sun, Jul 27, 2008 at 10:41 PM, Christian Sanchez
<[EMAIL PROTECTED]> wrote:
> Ok, let's see, I have the following in my bootstrap:
>
> $view = new Zend_View();
> $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
> $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
> //the line added after what you said
> $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
> $viewRenderer->setView($view);
> Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
>
> After this I have the following in my layout:
>
> <body class="tundra">
> <h1><?php echo $this->placeholder('title'); ?></h1>
> <?php echo $this->layout()->content; ?>
> <?php echo $this->form(); ?>
>
> <br />
> <br />
> </body>
>
> In the controller these line to add your example form:
>
> $form = new MyForm(); // I changed the name of the form to MyForm
> $this->view->form = $form;
>
> Now I get the following error:
>
> Warning: Missing argument 1 for Zend_Dojo_View_Helper_Form::form() in
> W:\usr\local\php\includes\Zend\Dojo\View\Helper\Form.php on line 62
>
> Am I doing anything wrong here?
Yes... Use the force, read source.
public function form($id, $attribs = null, $content = false)
It needs a parameter ID.
Your MyForm class needs to take care of that somewhere. If you want
help, paste your MyForm class on pastie or similar.
Till