3

i have a view with lot of exposed fields for searching ... (50 +) Ugly view

i am looking for some thing like this. nice one

with "add more " button you can add only the fields you want to search in .. possible ?

thanks

3
  • You can do it by custom code.
    – Cool
    Nov 14, 2013 at 10:20
  • Yes i guess that would be the last option .
    – brainHax
    Nov 14, 2013 at 13:23
  • did the dirty trick with jQuery , make a <select id='hider_s'> list in the views TPL , and print all the fields names in it and <option value="$theFieldID">. Hide all the exposed fields with css , and add below jQuery to select list . jQuery('#hider_s').on('change', function() { $selectedval=this.value; jQuery("#"+$selectedval).css("display","inline"); });
    – brainHax
    Nov 18, 2013 at 9:42

3 Answers 3

0

May be this can help - Views Dependent Filter.

Allows the presence of exposed filters on a view to be controlled by values in another exposed filter. Dependent filters are hidden when not relevant, and their values are not considered when the exposed form is submitted.

1
  • yes thats good , what it does that it just shows and hides the relevant fields based on a value . e.g if the magic word to show "lastname field" is "showMeLastName" then it will show the "last name" field , but as soon as u type "showMeMotherName" it will hide the last name .. i meant just one field will be shown ...
    – brainHax
    Nov 14, 2013 at 14:07
0

While it doesn't really solve your problem, Better Exposed Filters has a "Secondary exposed form" option. That allows you to select some number of filters and put them into a collapsible fieldset. So, you could have your primary filter options shown with (eg: English search options) with the Arabic options held in the fieldset.

Like I said, not exactly what you were asking for, but to do what you've shown would take custom coding -- probably easiest to do in the theme layer, or you could write a custom exposed form plugin.

1
  • yes , better exposed filter can be an option , i will give it a shot :) , thanks
    – brainHax
    Nov 17, 2013 at 8:50
0

With jQuery , make a <select id='hider_s'> list in the views TPL , and print all the fields names in it and <option value="$theFieldID">. Hide all the exposed fields with css , and add below jQuery to select list . jQuery('#hider_s').on('change', function() { $selectedval=this.value; jQuery("#"+$selectedval).css("display","inline"); });

Your Answer

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

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