Forums › Forums › Search & Filter Pro › Link to a pre-filtered search
- This topic has 6 replies, 1 voice, and was last updated 1 year, 2 months ago by Anonymous.
-
Anonymous(Private) June 1, 2017 at 9:42 pm #112696
Currently when you link to custom search results the search doesn’t run until you type in the query into the search field same goes for going to the URL directly. Is there a way to link to a pre-filtered search and have a filter selected and have the query already in the field when a user gets there?
Ross Moderator(Private) June 1, 2017 at 10:44 pm #112704Sure, when you perform a search the URL should update.
If it does not (and you have ajax enabled), then you need edit your search form, then head to –
display results
->ajax
->make searches bookmarkable
Once you do this, you can copy & paste the URL and its structure to generate whichever links you like.
Best
Anonymous(Private) June 1, 2017 at 10:51 pm #112707Under the AJAX section in Display Results I have the Load results using Ajax? and the Make searches bookmarkable? checked.
This is the url I am trying to go to http://www.raponline.org/?sfid=5489&_sf_s=richard%20cowart&_sft_content_type_news_and_events=workshop
Nothing shows up until you type into the search field. Would there be another setting that I could check out to make it work?
Ross Moderator(Private) June 1, 2017 at 11:01 pm #112713Hey John
I see there is a weird setting / implementation you have on your site.
The search bar does not even belong to S&F (but a dev, probably you, did a clever hack to integrate that with our search form).
If you use the inspector, you can see at:
http://www.raponline.org/?sfid=5489&_sft_content_type_news_and_events=workshop
Your results are there, but they have
opacity:0
Somewhere in your custom implementation of the search bar, you have some code controlling this I think – or simply, in your markup, you have an inline style setting the opacity to
0
initially.You just need to make sure, on page load, that the opacity is not set to
0
.Hope that helps
Ross Moderator(Private) June 2, 2017 at 12:39 am #112722Hey John
You could get the search term using the function here:
https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/#Get_the_Search_TermAnd display that as the
value
of yourinput
field in your markup.I think that should do the trick!
Best
-
AuthorPosts