So I think that putting exposed filters in multiple lines should be an option - don't force the user.

My experience:

I've installed the module - the exposed views filters started to appear in several lines.

When I commented out the include of views.js, everything returned to normal:


/**
 * Helper function that adds the JS to reposition the exposed filters of a
 * View just once.
 */
function _hierarchical_select_views_exposed_filters_reposition() {
  static $js_added;

  if (!isset($js_added)) {
//
//    drupal_add_js(drupal_get_path('module', 'hierarchical_select') .'/modules/views.js', 'module');
//
  }
}

Of course, I had to shorten the width of the filter fields, so that they will still fit in one line on most resolutions.

That's why I've added the following lines to template.php:


function phptemplate_views_filters($form) {
 if ($form['#view_name'] == 'bizlist') {
    $form['filter0']['#size']=10; 
    $form['filter1']['#size']=10; 
    $form['filter2']['#size']=10; 
    $form['submit']['#value']='Search'; // Change the label of the button from 'Submit' to 'Search'.
  }
  return theme_views_filters ($form);
}
CommentFileSizeAuthor
#3 hselect.jpg29.01 KBdruvision

Comments

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

I would *like* to agree, but I can't. If all exposed filters are put in the same row, things will be moving around every time a Hierarchical Select is updated… If you could find a work-around for that, I would gladly include this option.

wim leers’s picture

I saw the movie you pointed to from here, and this does seem to take the moving around into account. However, I really really doubt this is a generic solution: it will only work with your number of exposed filters (and even then the exact same exposed filters), and only with a Hierarchical Select of max depth 2. Which means I can't accept this as a solution, since we'd be worse off than we are now.

druvision’s picture

StatusFileSize
new29.01 KB

Both solutions have issues. The multiple-lines option has issues as well: No labels near the selection fields. The filter field labels are still on the top. A screen capture is attached.

That's why I suggest to have the single-lines as an option. At least until someone modifies views to support it....

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Will be taken care of in http://drupal.org/node/218219.

OmarQot’s picture

Hi,

How to make each level of the filters on separate lines?

Thanks,
Omar