Hello
I am currently developing a module that in short takes a name from a form and looks up a number of database tables and returns the results to a page as formatted output. I am having trouble getting my results to return to the page. I have the form working fine and the database search is working fine. I can prove this is working using debug to look at the array of results created and they are exactly what I would expect.
Here is my code, with the search stuff removed for clarity.
/**
* Create a form
*/
function people_search_block_form($form, &$form_state) {
$form['keys'] = array(
'#type' => 'textfield',
'#size' => 60,
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Search',
);
return $form;
}
/**
* Create a form handler
*/
function people_search_block_form_submit($form, &$form_state) {
drupal_goto('people_search/'.$form_state['values']['keys']);
}
/**
* Create the Search Form Menu
*/
function people_search_menu() {
$items['people_search/%'] = array(
'title' => t('Find a Person'),
'page callback' => 'people_search_output',
'page arguments' => array(3),
'access arguments' => array('access content'),
);
return $items;
}
/**
* Display output
*/
function people_search_output() {