I created a multi step form like in "Intro to Drupal 6 Multistep Form Domination Using Chaos Tools". In the first step I just want to display a view with users and some exposed filters. The circle (group) of users should be reduced by the use of the exposed filter. Later I want to perform an action for all users which remained in the filtered view when the "next" button was hit (at the end of the first step). My problem is, that the apply button of the exposed form does not submit the exposed for rather it submits the whole form so I reach step 2 without the possibility to refine the filters or to see the view result.
What can I do to just perform the filter action when I'm clicking on the apply button of the exposed form? (I also don't know how can I the values of the filtered view, but I think by submitting the first step (with the filters set, I can access them via $_GET['q']).
The form-array of the first step look like:
function mymodule_form_users(&$form, &$form_state) {
$view = views_get_view('my_view');
$view->override_path = $_GET['q'];
$my_view = $view->preview();
$form['user_list'] = array(
'#value' => $my_view,
);
// probably important -- i'm continuing to investigate
$form_state['no buttons'] = TRUE;
}
Comments
Comment #1
merlinofchaos commentedI think all you should actually need to do in this case is to set ajax = ON for the view so that it can do its updates via ajax. Back when this was asked, that probably would not ahve worked, but I think with today's CTools, it will.
Comment #3
osopolarBecause of the problem I had with the form wizard I had decided not to use it in the past case.
Anyway I'm wondering if this (ajax submited filter) also will work if the user switches of javascript?
Comment #4
merlinofchaos commentedThe modal doesn't work at all without javascript, so 'no'. =)f