If you have a custom "views-exposed-form.tpl" in your theme that does not render $button, then the hidden input element that indicates which block is being used also doesn't get rendered, and thus filters fail to work.

I just found this out the hard way, and am looking into just hiding the submit button with CSS for now.

Comments

guypaddock’s picture

Issue summary: View changes
berliner’s picture

Priority: Normal » Minor
Status: Active » Needs work

Hi, thanks for reporting this.

As I understand the situation, the problem you describe is caused by the default preprocessing of the expose form in template_preprocess_views_exposed_form():

At the bottom of this function there is this:

// This includes the submit button.
$vars['button'] = drupal_render_children($form);

This effectively renders any form element that has not been rendered earlier in this function. Because Views doesn't know about MEFIBS, this includes the hidden input elements. So all this is in the $button variable and if that is not printed ...

There is nothing I know of, that MEFIBS could do about this.

So, yes, either hide the submit button per css, or do a hook_form_alter on the exposed form in question and set the #access property of the submit button to FALSE.

Setting this issue to needs work for the moment, hoping that some Views wizard chimes in and enlightens me.

berliner’s picture

Title: Does not work in templates that hide submit button » Does not work when $button is not printed in custom views-exposed-form.tpl.php