5 replies [Last post]
Hunabku's picture
Offline
Joined: 08/14/2007
Juice: 25
Was this information Helpful?

Funny problem - for the Product content type i can't remove the "body" (body_filter) field. Yes i tried removing the text for the label. In fact, no matter what i put as the label text, it always displays the label text "Description" above the body field on my product node form.

Via phpmyadmin where would i remove the reference to the body field for the Product content type?

thanks

alanburke@drupal.org's picture
Offline
Joined: 08/05/2008
Juice: 82
Re: Removing Body Field Problem

Ddi you ever sort this out?
I'm trying the same thing

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Removing Body Field Problem

Looks to me like an oversight in uc_product.module where the node type information isn't checked before adding the body field to the node form. I'll poke Lyle for an update. Laughing out loud

alanburke@drupal.org's picture
Offline
Joined: 08/05/2008
Juice: 82
A quick hack...

In a custom module..put this code

<?php
/*
* Remove the Body field on Products
*/

function mymodule_form_alter($form_id, &$form) {
  if(
$form_id = 'product_node_form'){
    unset (
$form['body_filter']);
  }
}
?>
primal's picture
Offline
Joined: 08/21/2008
Juice: 39
Same Problem...

I tried the above code and I could not get it to work. I tried both making a custom module and applying it to my template.php. I still cannot remove the body field.

Is there another way that might work? Or more information on how to get the above patch to work?

alanburke@drupal.org's picture
Offline
Joined: 08/05/2008
Juice: 82
Remember, Unless your module

Remember,
Unless your module is called mymodule,
you need to rename the function to match that.

Regards
Alan