Howto disable certain fields from product listings and entry forms?

Posts: 4
Joined: 02/14/2008

First of, kudos for a terrific module.

Excuse me if this is a stupid question (and I have a nagging feeling it is), but how do I completely disable certain fields from the product listings and forms (and by 'disable' I guess I mean the equivalent of 'nuking')? I'm talking about the following fields in particular:

Below 'Product and its derivatives are shippable': Weight and Unit of measurement.
Below 'Dimensions': Units of measurement, Length, width and height.

They make no sense in my case because I'm selling services and I'm afraid it might confuse the site administrators.

TIA!

ap

Posts: 60
Joined: 01/19/2008
Uber Donor

maybe try store admin/config/product settings/product fields ?

there are check boxes for weight and dimensions if this is what you are talking about

Posts: 4
Joined: 02/14/2008

Thank you for your reply, yosemite1! Actually, I had already found those settings. Disabling the fields indeed removes them from the product page, but they're still in the edit form, which might be confusing for site administrators.
Perhaps this should be a feature request?

Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

For non-required fields, you can simply use CSS to hide them based on their div IDs, or where that won't work you can just use hook_form_alter() to unset the parts of the node edit form you don't want to show.

Posts: 4
Joined: 02/14/2008

Thanks Ryan! After searching for hook_form_alter() I found this post with example code. Thanks again!