I have an exposed filter for my view on a taxonomy field.
My goal is to open the view on a particular term and not on "ANY" as it does.

Is there a way to set a "default value" for my exposed filter?

I tried to send arguments but so far no luck...

Any help would be appreciated.
Thanks

Comments

dawehner’s picture

StatusFileSize
new48.93 KB

See this screenshot. This works fine as long it's not optional.

liquidcms’s picture

Category: support » feature

Dereine's solution won't work if you also want to limit list to selected items. I agree, it would be nice to have an addon module or built in to views to be able to select default filter settings.

the only way that i know so far to do it is form_alter code.

dimon00’s picture

Same problem here.
I had to restrict the item list.

My solution was to split my category in two. Not elegant but it is working...

A "default value for the exposed filter" would be the best solution.

liquidcms’s picture

i have a few cases where a simple "select default value" would be great solution; but also another where i want the default to be time based (i.e. pick current month, etc) - this would be trickier as default would need to support php code (like cck does)

rtdean93’s picture

StatusFileSize
new137.38 KB

YES - I need help here too... and boy does my brain hurt.

Situation:
I have one Vocabulary of products organized hierarchically.
I need an exposed select filter which is limited to a parent/child relationship
Since I am selecting terms then limiting the select box to those terms, the select filter is automatically highlighting the last term in the list (which gives an appearance that that is what the filtered term is).

SEE ATTACHED SCREENSHOT

I would love for the default to be ANY (as it is if the "Limit to selected items" is not selected)

Can I do this via a form alter? Everybit of help is appreciated.

jessicakoh’s picture

@rtdean93 Did you solve this?