2

Drupal-6

I created a content type and added some fields. I can manage how to show them in Diplays Field. But there are some 'core fields' which I can not hide in Displays Fields.

I need to hide the 'menu system field'. Can I do this? How? It would be great to hide it just for an specific role.

I uploaded a picture to show what I mean.

enter image description here

2

There are two ways you can do this.

You can do this with permissions for some items. 'Menu settings' is controlled by 'administer menu' permission.

If some item is being put onto the page which can't be controlled by permissions then you can use a form alter hook to remove them. I tend to set #access to false rather than completely removing the item from the form.

There is a big explanation of examples of how to alter forms here

  • Thanks Jeremy, I've neve used a form alter hook. Would you post an example code for this and tell where to put it? – chefnelone Jul 4 '11 at 12:53
  • It is quite a big topic. I have linked to it. You may find for your example changing the permissions would work. – Jeremy French Jul 4 '11 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.