Skip Navigation

[Resolved] The custom search form is not working as expected

This support ticket is created 5 years, 7 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 10 replies, has 2 voices.

Last updated by chong-sumw 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1257843

Thank you Luo.

However, I just found out that in view id (1645), the custom search form is not working as expected, it seems to cache results of first 1 or 2 searches, then further search on this page will not update new results .This is weird, coz when I created this view, I started by copied a working filter form (view id 536). I am hoping you could also help me to take a look. Thank you very much.

#1257877

Hello,

Please describe detail steps to duplicate the same problem.

I have tried these with your website duplicator package in my localhost:
1) Open URL hidden link
2) Search with keyword "小食生意", "小食店", "餐廳生意", I can see the results, there isn't the problem as you mentioned above:
further search on this page will not update new results

Please correct me if there is anything missing. thanks

#1257957

hi luo, the prob is not with the search box but rather in the filters of the form. for example, 行業 , 地區 , and 業主參與度

detail instruction to produce the bug:
1. in the abovementioned page, first click 進階選擇 to expand the filter form, then under 行業 check 服務業 , click search, there will be only one post.

2. then expand the form again , this time check 小食店/cafe, click search, u will see 3 posts, consisting of both 服務業 and 小食店 .

3. if you check 服務業 or other option, the result wont change.

4. instead if you check 飲食業 (parent of 小食店)at the beginning, you will get all results (including 服務業)

5. if you check 業主參與度, u will get all results despite which option you choose, the filtering is not working at alll for this filter.

hope this is detail and clear enough, thanks

#1258029

Thanks for the details, I can see the problem with your duplicator package in my localhost, but you are using custom HTML codes to setup the checkboxes fields, so it conducts the problem
https://toolset.com/forums/topic/arranging-and-style-taxonomy-term-checkbox-filters-in-custom-search/

I will check if there is other workaround for your case, and update this thread tomorrow morning.

#1259025

Please try these:
Edit all three taxonomy filter views:
- industry filter view
hidden link
- district parent filter view
hidden link
- district child filter view
hidden link

In section "Output Editor". remove shortcode:
[wpv-filter-meta-html]

And test again. This will remove HTML form tags from above views, and avoid form insider form problem.

#1259323

Thank you so much Luo, that works perfectly and simple.

What about the Owner Involvement 東主參與度 filter problem? whichever option you tick on the filter, it will show all results.

thanks

#1259567
jianzhi.JPG

For the problem: 東主參與度 filter problem
There isn't similar problem in my localhost with your duplicator package, I get one result after choose option "兼職", see screenshot jianzhi.JPG

Get three results when choose option "全職",
Get two results when choose option "投資管理".

There might be some changes after you make the duplicator package.

I suggest you check this:
edit the post view "Business Archive with expand filter view":
hidden link

in section "Query Filter", make sure there is a custom field filter:
AND
Owner Involvement is a string in URL_PARAM(wpv-wpcf-owner-involvement)

If the problem still persists, new please create ticket and provide the new duplicator package.

#1260247

The issue was there when I created the duplicator package as you can read from the private msg along this thread https://toolset.com/forums/topic/elementor-dynamic-field-cannot-show-0-value-from-custom-field/ in the msg where I uploaded the duplicator message.

In spite of that, I have deleted and recreated the query filter you mentioned but the prob still persists. Now I will create a new support ticket for this ticket and create a new duplicator package as instructed.

The issue in this thread has already been solved, many thanks to Luo

#1260303

I opened this tread and replied the following msg because I can't choose you as the supporter when I create a new ticket about this prob. Therefore please help me separate this as new ticket and hide the confidential link. thanks!

This is an extended thread of prob associated with custom search filter mentioned previously in https://toolset.com/forums/topic/elementor-dynamic-field-cannot-show-0-value-from-custom-field/ and https://toolset.com/forums/topic/the-custom-search-form-is-not-working-as-expected/#post-1260247

I have a custom search filter working fine except one of its filter which has only 3 options for user to choose. When one option is checked, no filtering action is done, thus all the results are shown. I have checked the custom query field and it's fine.

This happens in 2 views (view id: 1645, 546), the filter name is Owner Involvement.
New duplicator package link: hidden link

Thank you again for your help Luo

#1260643
#1260645

The issue of this thread is solved! lets continue the other issue in the new thread! thanks luo