Hi folks,
I'm writing a module to query an external database, return a list individual records from the database, and then link to unique records from the list, but am having trouble getting the return data to display. The Forms API Quick Reference and Forms API does not give instruction on how to do much other than return the form itself or a message -- fine if you are just using a form to submit data to be stored to a database, no-so-fine if you want to pull and display data.
Here's the relevent code I've got so far. I'm probably missing something simple. Can anyone point me in the right direction?
function listing_list() {
$output = listing_basic_form();
return $output;
}
function listing_basic_form() {
$form['basic'] = array(
'#type' => 'fieldset',
'#title' => 'query rmls',
'#tree' => TRUE);
$form['basic']['low'] = array(
'#type' => 'textfield',
'#title' => 'low',
'#size' => '12',
'#maxlength' => '12');
$form['basic']['high'] = array(
'#type' => 'textfield',
'#title' => 'high',
'#size' => '12',
'#maxlength' => '12');
$form['basic']['city'] = array(
'#type' => 'textfield',
'#title' => 'city',
'#size' => '12',
'#maxlength' => '20');
$form['submit'] = array('#type' => 'submit', '#value' => t('Search Housing'));
$output = drupal_get_form('listing_basic_form', $form);
return $output;
}