i have a view with lot of exposed fields for searching ... (50 +)
i am looking for some thing like this.
with "add more " button you can add only the fields you want to search in .. possible ?
thanks
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityMay 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.
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.
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"); });
<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"); });