2008年9月25日星期四

[fw-mvc] Zend_Dojo Editor (next)

Hi everyone,

I have a problem with the dojo editor, how is it possible to get the input of the dojo editor ?

Here's my code element :
           
   $this->addElement(
            'editor',
            'content',
                array(
                    'editActionInterval' => 2,
                    'focusOnLoad'        => true,
                    'height'             => '250px',
                    'styleSheets'        => array('/js/custom/editor.css'),   ));
           

I build my form and tried to access the elements :
echo "Content : " . $form->getValue('content');
echo "title : " . $form->getValue('title');
                   
I have something for the title but nothing for the editor's content.

I checked the html :
<input id="content" name="content" value="" type="hidden">
<textarea id="content-Editor" name="content[Editor]" type="text"></textarea>

So I changed 'content' to 'content[Editor]' but I got nothing.

One other thing, when using the form->validation, if one element does't validate, the content of the form is not redisplayed when using

if(!$form->isValid($formData) )
       $form->populate($formData);

So there's something I'm probably doing wrong.

Thanks for any inputs !
Z.


--
Interested in php & zend framework ?
http://myzendframeworkexperience.blogspot.com/




Téléchargez le nouveau Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !

没有评论: