[SOLVED] : I use inside page callback the function menu_rebuild(). it seems it's the solution. In this way, the $nid is updated everytime I visit a page which include the form, otherwise it remains the same. As far as I know, menu_rebuild() is rebuilding menu_router table. Still, I'm wondering if I can call menu_rebuild() for a specific menu and not all menus. It will be faster and reduce execution time, I guess. Any idea ?

I have a form included in many different pages. The only difference when you use the form in different pages is that I pass node_id (nid) argument by using drupal_get_form/page arguments. My problem is : when I use the form once the passing argument (nid) is correct ( let's say it's 8 ), but if I visit another page and use the form again the passing argument (nid) remains the same ( 8 ). It seems that drupal_get_form gets form post data from cache. How can I work around that ?

/**
* Implementation of hook_menu().
*/

function mymodule_menu() {

   $nid = arg(1);

   $items['manager/create_item']= array(
   'title' => 'Create item',
   'page callback' => 'drupal_get_form',
   'page arguments' => array('my_form',$nid),
   'type' => MENU_NORMAL_ITEM,
   'menu_name' => 'menu-creation',
   'weight' => 1,
   ); 

}

function my_form(&$form_state, $nid) {

   $form['myitem']['name'] = array(
   '#type' => 'textfield',
   '#title' => t('Name'),
   '#default_value' => '',
   '#required' => TRUE,
   );

   $form['myitem']['nid'] = array(
   '#type' => 'hidden',
   '#value' => $nid,
   );

   $form['myitem']['submit'] = array(
   '#type' => 'submit',
   '#value' => 'Save',
   '#submit' => array('myitem_insert'),
   );

}