Skip Navigation

[Resolved] I have trouble with parametric search : it includes more than it should

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to setup view filter as dropdown with default option text.

Solution:
When you Create/Edit your view filter it will open a popup and within that popup you will find following option:
"Label for 'not selected' option".

See image:
https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2016/03/378584-screenshot_mineshts.host_2016_03_28_15_09_28.png

You can find the proposed solution on the following link:
https://toolset.com/forums/topic/i-have-trouble-with-parametric-search-it-includes-more-than-it-should/#post-378584

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/front-page-filters/
=> https://toolset.com/documentation/user-guides/getting-started-views/part-7-building-a-parametric-search-with-views/

This support ticket is created 8 years, 1 month 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)

Tagged: 

This topic contains 9 replies, has 3 voices.

Last updated by stefanp 8 years ago.

Assisted by: Minesh.

Author
Posts
#376968
capture-02.PNG
capture-01.PNG

I am trying to filter the search using the parametric search. It gives some results than shouldn't appear

I visited this URL: hidden link

I expected to see: BMW for instance on a filtered search

Instead, I got: I got 3 BMW cars and 1 Ford Mustang

I don't understand why the Audi and the Ford Mustang are always there, no matter the search. Thank you for your help

#377037

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I checked problem URL you shared with us. I think this is due to the second filter dropdown.

I would like to review your views settings.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#377512

Minesh
Supporter

Languages: English (English )

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

I checked your view:
=> hidden link

If you navigate to "query filter" section and edit your query filter, I can see that the "Fields relationship:" setup with "OR" operator.

So, as you search with BMW and second dropdown filter has first value as "01 - Ain":
=> thats the reason it returned the result with records with "BMW" OR "01 Ain".

The extra record is displaying because "Ford Mustang" entry has assigned "01 - Ain".

Either you should use "And" operator with the "Fields relationship with your query filter section.

#377702

Hi,

I just did try to change the operator from OR to AND, but the result is actually worse : no cars found. You still have your acess, and caching is still deactivated.

How can I set up the search using one parameter only (car brand or area), and not having a relationship between the two ? It would make my day (and the website visitors)

Looking forward to reading your message.

#377812

Dear stefanp,

Minesh is not available currently, I suggest you setup both filters with same URL parameters name. and use "OR" logic to combine them.

#377819

Hello Luoy,

I didn't catch the meaning of your message : would you have an example that I could rely on to make the modification ?

#378002

I assume you are going to filter different fields with same field in the form, you can try setup both filters by same URL parameter, see the solution in another thread:
https://toolset.com/forums/topic/alphabetical-filter-option/#post-377966
step 1)

#378387

Hi,

I did try to edit the view as you recommended but still couldn't get it working properly. I alos have another question regarding this solution : what should the url_param field contain : a pre-existing custom field or could it be anything ?

However, I did notice something : it doesn't work properly when I use two "select" searches. If I let Types choose (Types auto style), it works.

Problem becomes that for the areas it chooses checboxes, and there a lot of them. It also chooses an input field for the brand.

Is it possible that two "select" fields are too much, that you wold have to choose one with checkboxes and another one ?

#378584

Minesh
Supporter

Languages: English (English )

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

screenshot-mineshts.host 2016-03-28 15-09-28.png

Sorry for the delay here. I'm back from holidays,

I could not able to make any changes with your filter last time that is why I asked you to change it.

When you edit your filter it will open a popup and within that popup you will find following option:
"Label for 'not selected' option". Please find attached image.

You should setup default option for both your filter. Could you please add default select text, for example:
"select one option"

#378818

Hello Minesh,

That did the trick alright ! Thank you very much, great support from you guys !

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