10

I'm hoping someone can help a Drupal beginner removing a view from my page. The purpose of it is a for data collection.

This is the section I am trying to remove:

screenshot

1
  • 3
    Image link is broken.
    – Citricguy
    Oct 12 '12 at 11:58
10

In your MODULE_form_alter hook add:

$form['revision_information']['#access'] = FALSE;
4

The best solution would be to bind it to a permission which can then be tied to a role.

use this code in a custom module:

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  $form['revision_information']['#access'] = user_access('view revisions');
}

Then only roles with 'view revisions' permission can see this tab.

2

Take a look at Jammer.

The best description for what that module does can be found in the project page:

This module is intended to be a dumping ground for removing things from the user interface that might not be appropriate in all cases or just plain confuses certain audiences.

The revision information that you mentioned is one of the many things that are considered "confusing" and that you can remove with jammer.

P.S: An extra plus is that Jammer has a stable D7 version.

1

This can done by using following code in hook_form_alter function.

$form['revision_information']['#access'] = FALSE; 
          OR
$form['revision_information']['#disabled'] = TRUE;
1

Also use :

$form['revision_information']['#type'] = 'hidden';

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.