3

Problem is similar to drupal.org/node/1807916 #65.

I'm using Views ("7.x-3.6+4-dev" in D7.21) exposed filter in bartik, with my filter exposed as block in sidebar. When I click the reset button I am redirected to homepage instead of current page as desired.

URL shown:

"localhost/?field_sku_value=123&field_name_value=&field_component_value=&op=Reset"

(last filter values)

Filter exposed on Views Page is ok.

Try to tweak $form_state['redirect'] in views_plugin_exposed_form.inc doesn't work. Any idea?

2
  • Same here. I am having a views content pane with views attachment und exposed filters within a block on a user profile page. The filters working correctly and are staying on the same page, but the reset button redirects to the frontpage.
    – oll
    Commented Aug 20, 2013 at 17:57
  • AJAX option on? Commented Aug 16, 2015 at 16:51

3 Answers 3

1

There is a jquery fix for this issue. See https://drupal.org/node/1109980, #23.

1

If your view is rendered inside a panel, you can choose the option "Use Panel path" in the pane settings of your view display.

1

The solution from https://www.drupal.org/node/1264316#comment-6930726 worked for me. Just copy the views-exposed-form.tpl.php to views-exposed-form--block.tpl.php from views module folder to your template folder and change the reset button code to:

<?php if (!empty($reset_button)): ?>
      <div class="views-exposed-widget views-reset-button">
        <input type="reset" id="edit-reset" onclick="history.go(0)" name="op" value="Reset" class="form-submit">
      </div>
<?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.