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

  • You can do it by custom code. – ARUN Nov 14 '13 at 10:20
  • Yes i guess that would be the last option . – brainHax Nov 14 '13 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 '13 at 9:42
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.

  • 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 '13 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.

  • yes , better exposed filter can be an option , i will give it a shot :) , thanks – brainHax Nov 17 '13 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, privacy policy and cookie policy

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