2008年9月25日星期四

Re: [fw-mvc] Zend_Dojo Editor (next)

-- Zladivliba Voskuy <nospampam@hotmail.fr> wrote
(on Thursday, 25 September 2008, 05:24 PM +0200):
> Thank you for your reply. I'm following your recommendations and I'm using the
> trunk editor, not the one on your blog.
>
> I investigated this a little more and it seems the form can't validate : here's
> what I have :
>
> $form = new TmpPostForm();
> $formData = $this->_request->getPost();
>
> if(!$form->isValid($formData))
> {
> echo "<br>Content : " . $form->getValue('content');
> echo "<br>title : " . $form->getValue('title');
> echo "<br><br>";
> }
> else
> echo "not valid form";
>
> $this->view->form = $form;
>
> I always get "not valid form", what is strange considering the fact that I
> reduced the Editor element to a minimum :
>
>
> // new class with dojo
> class TmpPostForm extends Zend_Dojo_Form
> {
> public function init()
> {
> // Dojo-enable the form:
> Zend_Dojo::enableForm($this);

First, you don't need to do the above line when extending
Zend_Dojo_Form.

Second, can you specify what you entered for the editor, and what data
you received on the server side after submitting? Also, what browser did
you use to submit?

I'm thinking the issue may be in the code used to push the Editor
content into the hidden field via the form unsubmit event, but I need
the above data to help verify.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: