Right now the only way to override the "Any" label in the exposed form is through form alter.
The attached patch will give the user the option to override the default "Any" label with a custom label.
For example if content type filter is exposed right now it shows
<Any> OR - Any -
Article
Basic Page
But with the attached path it gives an option to override the label with a text field. And it can look in any of the 2 default formats based on the default formats selected at the views setting level
<Content Type> OR - Content Type -
Created a similar feature request in core at
#2035941: override label for "Any" value on non-required single-select exposed filters per exposed field
Comment | File | Size | Author |
---|---|---|---|
#4 | override_views_exposed_any_label-2035945-4.patch | 3.3 KB | junedkazi |
#1 | override_views_exposed_any_label-2035945-1.patch | 3.34 KB | junedkazi |
Comments
Comment #1
junedkazi CreditAttribution: junedkazi commentedComment #2
junedkazi CreditAttribution: junedkazi commentedComment #4
junedkazi CreditAttribution: junedkazi commentedComment #5
junedkazi CreditAttribution: junedkazi commentedComment #6
ycshen CreditAttribution: ycshen commentednice feature
i have tested it,really good patch.
Comment #7
aimeeraeI have tested patch in #4, it works as expected and very intuitive. Thank you, very nice, very useful.
Comment #8
jags880 CreditAttribution: jags880 commentedNice patch! Do you know how I might be able to get this option on grouped filters?
Comment #9
linuxsn CreditAttribution: linuxsn commentedhi , i'm newbie .does a patch only work for the version specified ?
Comment #10
FNGR CreditAttribution: FNGR commentedreally really nice patch! long time i looked for that!!
thank you
Comment #11
chrisgross CreditAttribution: chrisgross commentedFYI, the Better Exposed Filters module has this feature, as well.
That being said, this patch does work for me.
Comment #12
chrisgross CreditAttribution: chrisgross commentedComment #13
colanWe've recently switched our testing from the old qa.drupal.org to DrupalCI. Because of a bug in the new system, #2623840: Views (D7) patches not being tested, older patches must be re-uploaded. On re-uploading the patch, please set the status to "Needs Review" so that the test bot will add it to its queue.
If all tests pass, change the Status back to "Reviewed & tested by the community". We'll most likely commit the patch immediately without having to go through another round of peer review.
We apologize for the trouble, and appreciate your patience.
Comment #14
jenlamptonRTBC from me as well.
Comment #15
riddhi.addweb CreditAttribution: riddhi.addweb at AddWeb Solution Pvt. Ltd. commented