How to target and remove a given fieldset I am very new to drupal and have been playing around with lots of different modules and core features. I have now come to an issue I have been trying to solve for the pass 48hrs without finding the right solution.

I am building a forum, using the core module, but my problem is when users post a new topic / comment, they are given the option of selecting which 'text format' they want to use. I want drupal to take it as given that filtered HTML is the only option and not offer the use a 'plain text' format.

I can just target the fieldset's id with 'display:none' in CSS and that does work, will not display any more, but I would like to know how to remove the fieldset code itself.

I have tried this,

function THEMENAME_form_alter(&amp;$form, $form_state, $form_id)  {
  unset($form_id('edit-body-und-0-format');
} 


The 'edit' id is the id on the fieldset for the text options, but all this does is give me the white screen of death....

So what I am doing wrong?

Many thanks for any help given....

Glenn.
There's a wee bit of confusion in your PHP code there; you're calling a function with the same name as the string passed in $form_id, and passing 'edit-body-und-0-format' as a parameter.

What you need to do is change the relevant field in the $form array, e.g.

function THEMENAME_form_alter(&amp;$form, $form_state, $form_id)  {
  $form['edit-body-und-0-format']['#access'] = FALSE;
}


Using #access is preferred to unset(); there might be something in a validation/submit handler that's relying on the existence of those fields, whether or not values have been submitted this time round, and removing it completely might break those (or cause some unpleasant warnings).

If you haven't already installed it, the Devel module is a must for development; you can use the dpm() function to inspect PHP elements on the front end. If you add dpm($form); to your current function, for example, when you visit the page you'll see a nice structured output of the $form variable making it easy to find the element(s) you want to alter.

Update...

If you're trying to hide the text format options there's a slightly different approach. You need to attach an after build function to the textarea, and remove the format options in there. For example:

function THEMENAME_form_alter(&amp;$form, $form_state, $form_id)  {
  if ($form_id == 'some_form') {
    $form['body']['#after_build'][] = 'MYTHEME_body_after_build';
  }
}

function MYTHEME_body_after_build($element) {
  $element[LANGUAGE_NONE][0]['format']['#access'] = FALSE;
  return $element;
}


or something very similar.