Skip Navigation

[Resolved] Pass default value to a select in a search form

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1364153

Hi,
I have a search for with a select named color.
I would like to call the search page adding a url paramter like color=red and it form will show all the items with red as default.
Is it possibile ?
Thanks,
Gianni

#1364207

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would lilke to know how the color is configured on your site? is it a taxonomy or custom field?

#1364235

Hello Minesh,

it is a custom field.

Thanks,
Gianni

#1364239

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - you can add the custom field filter to your view and set your field to filter by URL param.
=> https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/#source-for-compare-value

Please check the following Doc:
=> https://toolset.com/documentation/user-guides/front-page-filters/#vfmh-adding-search-controls

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.