Hello I am writing a module that is a block with a form in it. I would like to display the data back to the form, or to a div on the page, but not through "drupal_set_message".
I am assuming I need to use a callback, but I dont understand it very well... my code
function store_locator_block_view($delta = '') {
switch($delta){
case 'store_locator':
$block['subject'] = t('Find a local retailer');
$block['content'] = drupal_get_form('store_locator_my_form');
break;
}
return $block;
}//block view
function store_locator_my_form($form_state) {
$form['location']['zip'] = array(
'#type' => 'textfield',
'#size' => 10,
'#maxlength' => 5,
'#title' => t('Zip Code'),
);
$form['location']['text'] = array(
'#type' => 'fieldset',
'#title' => t('OR'),
);
$form['location']['city'] = array(
'#type' => 'textfield',
'#size' => 20,
'#maxlength' => 25,
'#title' => t('City'),
);
$form['location']['state'] = array(
'#type' => 'select',
'#title' => t('State'),
'#options' => array(
'' => 'select a state...',
'AL' => 'Alabama',
),
);
$form['location']['markup'] = array(
'#type' => 'fieldset',
'#title' => t('Choices'),
'#prefix' => '
',
#suffix' => '
',
),
);