If you go here:

http://www.symfony-project.org/blog/2008/10/18/spice-up-your-forms-with-some-nice-widgets-and-validators

then you see this as an example:

$this->widgetSchema['content'] = new sfWidgetFormTextareaTinyMCE(array
(
  'width'  => 550,
  'height' => 350,
  'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
));


So I put this into my code (into NewNewsForm.class.php):

    $this->widgetSchema['description'] = new
sfWidgetFormTextareaTinyMCE(array(
          'width'  => 550,
          'height' => 350,
          'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
        ));

and I refresh the browser that is pointing to the form page, and I get
this error:


[InvalidArgumentException]
You must pass a "class" attribute for a TinyMCE widget (new_news
[description]).

stack trace at () in SF_ROOT_DIR/plugins/sfFormExtraPlugin/lib/widget/
sfWidgetFormTextareaTinyMCE.class.php line 60 ...
  {
    if (!isset($attributes['class']))
    {
      throw new InvalidArgumentException(sprintf('You must pass a
"class" attribute for a TinyMCE widget (%s).', $name));
    }
    $textarea = parent::render($name, $value, $attributes, $errors);
at sfWidgetFormTextareaTinyMCE->render('new_news[description]', 'Davy
Johnson, now a Junior, shows great promise. ', array(), null)
in SF_SYMFONY_LIB_DIR/form/sfFormField.class.php line 117 ...


I'm using Symfony 1.1.4

Does anyone have a clue why this is happening?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to