By Serotonine on
Hello
No way to make working the path to the module_drie_form. Any Help ?
/**
* implement hook_menu()
*/
function module_drie_menu(){
$items= array();
$items['module/drie'] = array(
'title'=>'Display text form',
'description'=>'Link to the form',
'page callback'=>'drupal_get_form',
'page arguments'=>array('module_drie_form'),
'access arguments' => TRUE,
'type'=>MENU_NORMAL_ITEM,
);
return $items;
}
/**
* implement drupal_get_form()
*/
function module_drie_form($form, &$form_state){
$form = array();
$form['texte'] = array(
'#type' => 'textfield',
'#title' => t('Fill your texte there'),
'#maxlength' => 250,
'#size' => 100,
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('sturen'),
);
return $form;
}
Thanks
Comments
'access arguments' =>
The boolean "everyone has permission" has to be set on access callback, so
Even better; a real permission for access arguments.
Arf !
it works !!
But now I've a warning : Invalid argument supplied for foreach() in menu_unserialize() (line 400 of /var/www/drupal-one/includes/menu.inc).
Dunno if it's linked or not...
Thanks anyway !!
That's better like that