Drupal: customizing the appearance of the WorkFlow module

The Workflow module adds a Workflow window to the Edit node screen. This field contains a list of available states for this node as well as additional options such as:

"Schedule: Urgently schedule change of state:"

I don't want to confuse users with a lot of options and want to remove the last two (date related). Where should I customize this kind of edit screen and hide these fields?

0


a source to share


2 answers


hook_form_alter

hook can be used to change the appearance of any Drupal form.

Here's some pseudo code to get you started.



<?php

function mymodule_form_alter(&$form, $form_state, $form_id) {
  if($form_id == 'id_of_the_form') {
    unset($form['field_you_want_to_hide']);
  }
}

      

+1


a source


You can turn off workflow scheduling on the Permissions page. In admin / user / permissions, uncheck "Workflow transitions".



+2


a source







All Articles