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:
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIn your MODULE_form_alter
hook add:
$form['revision_information']['#access'] = FALSE;
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.
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.
This can done by using following code in hook_form_alter function.
$form['revision_information']['#access'] = FALSE;
OR
$form['revision_information']['#disabled'] = TRUE;