Search This Blog

Loading...

Wednesday, December 28, 2011

Drupal - how to disable “Input Format” fieldset in node edit form

I am using hook_form_alter to disable some publishing options whet authors adds or edits the nodes:

/**
* hook_form_alter ()
*/
function mymodule_form_alter(&$form, $form_state, $form_id) {
global $user;

if ($form['#id'] == 'node-form') {

unset($form['comment_settings']);
unset($form['path']);
unset($form['revision_information']);
unset($form['author']);
}
}
However - I can not find (even in debugger) what variable to unset to disable Input Format options to prevent users from changing default format. Do you other way to do that?

0 comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails