First, if you want to get an argument from the URL, you should declare it in hook_menu, as such:
$items['items_form/%'] = array(
'title' => 'Item Form',
'page callback' => 'drupal_get_form',
'page arguments' => array('get_item_form', 1),
'access arguments' => array('access items_form content'),
'type' => MENU_NORMAL_ITEM, //Will appear in Navigation menu.
);
Drupal's menu system will then pass in the itemid to drupal_get_form(), which will then pass it along to your form declaration function. You will need to add an argument to your function definition to access it, suggest something like this:
function get_item_form($form, $form_state, $itemid = NULL){
$form = array();
...
}
Please look at the documentation for hook_menu for more information about how to handle URL arguments. I would caution against using arg() in your code.
The reason this is important is what happens when you submit your form with a URL argument. By default, if you do not override with the #action parameter in your form, it submits a POST request to the present URL. By not declaring that your URL has an argument in it, Drupal actually doesn't know how to handle a request to *items_form/123*. The only reason you see anything but a 404 when you go to *items_form/123* is that Drupal attempts to find the nearest path. I suspect that since it doesn't know explicitly what to do when a request is made to *items_form/123* it breaks the form submission handling.
I should also mention that you'll need to declare both *items_form* and *items_form/%* menu paths if you wish them both to work. They're distinct paths in the eyes of Drupal's menu system.
'page callback' => 'drupal_get_form'
in your code.function get_item_form_submit($form_id, $form_state) { echo "Hallo"; }
'function get_item_form_submit($form_id, $form_state) { echo "Hallo"; die; }