Hello,
I am developig my own module. I need a custom callback function. So, I created it:
$items[] = array('path' => 'node/'. arg(1) .'/change_workflow', 'title' => t('Change workflow'),
'callback' => 'node_article_change_workflow',
'access' => TRUE,
#'access' => user_access('change workflow'),
'weight' => 2,
'type' => MENU_LOCAL_TASK);
However, in node_article_change_workflow, $_POST is always empty:
function node_article_change_workflow(){
# Set the entry point node/XX/pass which accepts the revision
#
if ( is_numeric(arg(1)) && $node=node_load(arg(1)) ){
$body .= "FORM: ".$_POST." SIZE: ". sizeof($_POST)."
"; // ALWAYS 0!!!
// THE REST IS TO PRINT THE FORM OUT...
$form['workflow_submitted'] = array('#type' => 'hidden', '#default_value' => '1', '');
$form['submit'] = array('#type' => 'submit',
'#value' => t('Go!'),
'#weight' => '6');
$form['#action'] = '/node/'. arg(1) .'/change_workflow';
if($node->uid){ $form['author_ok'] = array('#type' => 'checkbox', '#title' => t('Author\'s OK'), '#default_value' => $node->author_ok, '#weight' => 1);}
if($node->editor_uid){$form['editor_ok'] = array('#type' => 'checkbox', '#title' => t('Editor\'s OK'), '#default_value' => $node->editor_ok, '#weight' => 2);}