3 replies [Last post]
diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Was this information Helpful?

Hi,

When i create a product, how can i remove some of the field in the form? What i did is to remove them directly in the product module when i used 7c but now, with 7e i loose all that changes (ok, i have a backup rs), is there a better way to remove those fields? I don't like to hack the core and as far i know, only theming functions can be overwritten in the template file.

thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Best way to remove product fields
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Best way to remove product fields

Ok... you want to actually disable the input of these things? Well, I'd be careful about what you disable, since modules may be looking for that stuff. But if you've got it working, then I guess it's alright. Create a module file for your site and implement hook_form_alter() for the product node form. With this you can unset the elements in the array that you don't want.

Alternatively, you could use CSS to set those fieldsets and field item divs to display: none.

diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Re: Re: Best way to remove product fields

Lyle: Thanks, but my question is about the input fields when you create a product.

Ryan: Thanks again, maybe the best and more safe way is to use CSS to hidden them, this way i stop haking the core and having problems with updates.