Hi ! I want to make somethin like this
At first i have a menu hook so i have a path like http://host/mymodule/listsomething . At this page i have form for making filter settings and below of this a result table with the result of this filter. Something like a checkbox "voted good by others but not me" and so on and so on. If i now set the filters and press the go button on this form the page regenerates and the listing should show the filtered result.
At the moment i have a solution with using $_GET variables. The submit function reads the form_state values and generates the Get parameter string to add it then to a url.
Via drupal_goto i go to this url and everything is fine. But i read about the form api and that this is maybe not the right and perfekt way. So i tried working with the form_state variable on the form itself by making something like
$form['title_filter'] = array(
'#type' => 'textfield',
'#title' => t('filter by title'),
'#default_value' => $_POST['title_filter'],
'#value' => $_POST['title_filter'],
'#size' => 20,
'#maxlength' => 30,
);
or
$form['title_filter'] = array(
'#type' => 'textfield',
'#title' => t('filter by title'),
'#default_value' => $form_state['post']['title_filter'],
'#value' => $form_state['post']['title_filter'],
'#size' => 20,
'#maxlength' => 30,
);
But no success with this ! ;(
Any help and hints are Welcome !