1

I'm new at Drupal and I am having trouble with comments in some content types. I create a new content type and check that it'll hava comments, but I don't want the Wysiwyg editor, so I disable it, but it's still there, how can I disable it for a content type speciffic? NOTE: I Turn off the Wysiwyg comments in this content Type.

2
  • What version of Drupal?
    – mpdonadio
    Commented Sep 16, 2011 at 15:23
  • Cool. If someone else dosen't come up with a better solution, you should accept the answer (click the check mark) when the system allows you to.
    – mpdonadio
    Commented Sep 16, 2011 at 19:44

1 Answer 1

2

For Drupal 6, I normally add the following to a custom module:

function mymodule_form_alter (&$form, &$form_state, $form_id)
{
  if ($form['#id'] == 'comment-form') {
    $form['comment_filter']['format'] = array(); // nuke wysiwyg from comments
  }
}

To be honest, I can't recall why I am using $form['#id'] instead of $form_id for the conditional.

1
  • No upvotes yet on this? +1'ed, nice tip, thanks! Commented Dec 23, 2011 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.