By gcornoiu on
Hi guys,
I have a Drupal 6 instance with many content types. Most of them have extra fields. What I want to do is hide some common fields like "Comments options", "Menu options", "Publish options" etc. I saw that people use the hook_form_alter. Is this the best way to hide content type fields?
Thanks,
Gabriel
Comments
nodeformsettings
In case you want to use a ready-made solution: nodeformsettings allows you
to hide those fields (among others), and it does it via hook_form_alter.
formfilter is more flexible
Hi skizzo,
I have tried it and I saw that is very basic. A more flexible solution is the formfilter module.
Thanks,
Gabriel
I don't know how to hide them
I don't know how to hide them completely, but you might want to have a look at Vertical Tabs if you do not know that module already. It makes the node edit form much more pleasant in Drupal 6! And with CCK you can rearrange the fields order so that the most important appear first, and hide the lesser used ones within tabs at the bottom.
Also, for normal content editing and creation, you could log in as a user role without the "administer nodes" permission. Then you won't see most of those options.
Another useful module for customizing the node options is Override Node Options
hiding menu option
You can use Menu Settings per Content Type to hide the menu options.