0

I have 2 views-blocks with autocomplete filters, both filters are for the title field. And autocomplete filters display no result when the views are placed on the same page. How to make them to not conflict with each other?

I use this module Views Autocomplete Filters

5
  • 1
    I think, we need some more details of what you're trying to achieve and how your views are set up.
    – Volker
    Dec 21, 2015 at 9:25
  • 1
    this may help you drupal.org/node/1392366
    – WaQaR Ali
    Dec 21, 2015 at 9:38
  • I think you have selected equal to operator instead of contains operator. Also please check if you are using ajax than you can use same field name under More option else you need to change that and need to be seperate.
    – Shubham
    Dec 21, 2015 at 9:54
  • It's set contains on both and ajax is also switched on
    – FredMer
    Dec 21, 2015 at 10:57
  • Ok, than try with changing the fields name.
    – Shubham
    Dec 21, 2015 at 11:52

2 Answers 2

0

The link provided by WaQaR Ali solved the problem.

The problem lies in the fact that two form-fields get the same ID. Placing this code in a hook_form_FORM_ID_alter():

<?php
 $form['title']['#id'] = 'form-text-' . rand(0,100); 
?>

Thank you Ali!

0

You can solve this issue by

1-clicking on your filter (in the view UI, under 'Filtering criteria')

2-Then scroll down in the opened window until you can open the "more" fieldset

3-Change the Filter ID to make it unique.. I mean if you can't have 2 block view on the same page with the same filter ID

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.