Drupal - Remove 'Revision Information'

Q: How can I get rid of that pesky but persistent 'Revision Information' settings section from the create & edit content forms in Drupal 6?

A: You just need to hook into the phptemplate_node_form() function and disable the field - just a bit of PHP required!

In Drupal, the forms for creating and editing content can be very busy and cluttered with all sorts of options that may be completely irrelevant to your current web development project. Most can be removed if necessary by setting the appropriate permissions, but there is no easy way to remove the 'Revision Information' & 'Log Message:' stuff through changing settings. Now I am not a web designer myself but I do know that having fields hanging around that aren't required is not a good web design ploy! (isn't that right Shane?)

Well, there is a quick hack to make it go away, this method is frowned upon by some but it is quick, easy and it works very very well - needs must when the devil drives and all that!

So, to get rid it from your web application (in Drupal 6), edit the template.php file in your theme's folder and insert the following function:

function phptemplate_node_form($form)
{
$form['revision_information']['#access'] = FALSE;
return theme_node_form($form);
}

Save the file, and then visit the 'Modules' admin page in Drupal's Administration section, that will force Drupal to reload your recent change..

Now when you create or edit a content type the forms should be blissfully clear of any 'Revision Information' section!

Thanks to all at: http://drupal.org/node/117148

Stranger
Stranger's picture
Gr8 tutorial, it took me less

Gr8 tutorial, it took me less than 10s to make this working, thx :D

http://shaman.us.to

Stranger
Stranger's picture
Drupal - Remove 'Revision Information'

Check this interesting module formfilter
http://drupal.org/project/formfilter
you can remove a lot of stuff from a form, not only revision information,
i tried the -dev version for drupal 6 and it seems that it's working

Joined: 10/10/2008
User offline. Last seen 6 days 22 hours ago.
Thanks for that, looks

Thanks for that, looks interesting.

-----------------------------------------------

Award Winning Web Design Cork : Pride Web Design Cork

-----------------------------------------------

Joined: 08/01/2009
User offline. Last seen 3 weeks 1 day ago.
Thanks Anon for the tip, I am

Thanks Anon for the tip, I am once again in the need of some form tidy up so I will take a look at the -dev version for Drupal 6.

Joined: 08/01/2009
User offline. Last seen 3 weeks 1 day ago.
I just found the Jammer

I just found the Jammer module which I am using to remove the preview button from my node and comment forms. It also has an option for removing the revision text, so you might find that either the formfilter or jammer modules may be a better option for you than having to manually alter your template!

Stranger
Stranger's picture
How to remove the revision information dropdown

Had a quick try but couldn't get the code to work, I like the Jammer module though. Anyone now how to get rid of the revision information fieldset all together as the Jammer module just removes the textbox within the fieldset, unless I'm doing something wrong

Stranger
Stranger's picture
Thx. Worked perfectly

Thx.

Worked perfectly

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Pride on FacebookPride on TwitterPride on TwitterPride on Twitter

Join Our Newsletter

* indicates required

Irish Internet Association

finalist.png
phone-number.png