Yii Framework Forum: TinyMCE field is not validated with jformvalidate - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

TinyMCE field is not validated with jformvalidate Rate Topic: -----

#1 User is offline   Jaime 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 15-August 09

Posted 29 August 2009 - 09:51 AM

Hello..

I have placed in a form the TinyMCE widget whose content is required. The corresponding database field is called "texto", so that, I added the rule required for field "texto" in the model.

In the form view I wrote:

<?php $this->widget('application.extensions.tinymce.ETinyMce', array('name'=>'Pagina[texto]',
                                                                     'plugins' => array('safari', /* ... */),
                                                                     'options' => array( 
  					                                                 'theme' => 'advanced', 
  	                                                                                 'skin' => 'o2k7', 
                                                                                  ),   
                                                                     'width'=> '95%',   
                                                                     'value' => $model->texto)); ?>



That field is present among other required fields.

If I enter nothing in the form and press submit, the other required fields are validated by jformvalidate, not the TinyMCE one.

If I fill the other required fields and press submit, normal validation occurs and the error that the TinyMCE field must not be empty is displayed.

Why jformvalidation is not working for TinyMCE?

Thanks
Jaime
0

#2 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 645
  • Joined: 29-November 08
  • Location:Paris, France

Posted 29 August 2009 - 12:53 PM

Hi Jaime,
the jformvalidate extension has never been tested in the case you're describing and it would be surprising that it would work. It is dedicated to validate forms on the client side, and TinyMCE cannot be considered as a form.
However I'll take a look at it (if I have time).
ciao
8)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users