Thanks.
Matthew Weier O'Phinney-3 wrote:
>
> -- gerardroche <[EMAIL PROTECTED]> wrote
> (on Wednesday, 08 October 2008, 06:25 AM -0700):
>>
>> Two bugs i think, both occur when you dojo enable a form. version 1.6.1
>>
>> e.g.
>>
>> 1.
>>
>> This :
>>
>> $form = new Zend_Form();
>> Zend_Dojo::enableForm($form);
>
> First, if you're going to use Dojo elements and you're building the form
> programatically anyways, just use Zend_Dojo_Form instead of Zend_Form.
> It saves you a step, and will be more efficient in the long run.
>
>> $form->addElement('text', 'foo', array('label' => 'bar'));
>> echo $form;
>>
>> will output :
>>
>> <form enctype="application/x-www-form-urlencoded" action="" method="post"
>> name=""><dl class="zend_form">
>> <dt><label for="foo" class="optional">bar</label></dt>
>> <dd>
>>
>> <input type="text" name="foo" id="foo" value=""></dd></dl></form>
>>
>> Notice the empty name attribute, name="".
>
> This is because you did not specify a name or ID to the form object.
>
>> 2.
>>
>> All textarea elements break when a form with custom decorators is dojo
>> enabled. Am i doing something wrong here?
>>
>> e.g. The following will break with the error "Catchable fatal error:
>> Argument 4 passed to Zend_Dojo_View_Helper_Textarea::textarea() must be
>> an
>> array, null given in
>> path\to\Zend\1.6.1\library\Zend\Dojo\View\Helper\Textarea.php on line 64"
>
> <snip>
>
>> $form->addElement('textarea', 'foo', array(
>> 'decorators' => array(
>> 'Description',
>> 'Errors',
>> 'ViewHelper',
>
> Don't use 'ViewHelper' here -- use 'DijitElement'.
>
>> array('Label'),
>> array('HtmlTag', array('tag'=>'li'))
>> ),
>> 'label' => 'bar'
>> )
>> );
>
>
> --
> Matthew Weier O'Phinney
> Software Architect | [EMAIL PROTECTED]
> Zend Framework | http://framework.zend.com/
>
>
--
View this message in context:
http://www.nabble.com/Zend_Form---Zend_Dojo%3A%3AenableForm%28%29-bugs--tp19878670p19915627.html
Sent from the Zend Framework mailing list archive at Nabble.com.