I am trying to learn to make modules, and I am using the drupal book 'Pro Drupal Development' So there is a module for this tabbed menu, well the book only adds content to the front page, I am trying to take it futher..I want to make a form for the 'Add Flavor' page. All I want it to do is have a text field that you type the flavor into and then submit it---for now that is all I am trying to do and I can get the form to display, the only thing it displays is the word 'Array' capitalized just like that...
...here is the code for the whole module, my code is at the bottom
<?php
// $Id$
function milkshake_perm() {
return array('list flavors', 'add flavor');
}
/**
* Implemetation of the hook_menu().
*/
function milkshake_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'milkshake',
'title' => t('Milkshake flavors'),
'callback' => 'milkshake_overview',
'type' => MENU_NORMAL_ITEM
);
$items[] = array(
'path' => 'milkshake/list',
'title' => t('List Flavors'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'access' => user_access('list flavors'),
'weight' => 0
);
$items[] = array(
'path' => 'milkshake/add',
'title' => t('Add Flavor'),
'callback' => 'milkshake_add',
'type' => MENU_LOCAL_TASK,
'access' => user_access('add flavor'),
'weight' => 1