I create the search form and i combined with the view, but when i press search button
i always get the answer
"No Entries Found"
till i refresh the page.. Then i get the filtered values view.
In order for a search to work, a SQL query must execute on your server to return the result set for the view. This means that before you hit submit, views will always show "No entries found" until the search query is executed on the server. To see the result, you must refresh the page. The way to prevent seeing "No entries found" is to use two pages for your search. The first page only has the search form. When you submit the search criteria, the search form redirects to the second page that has both the search form and view. You'll only see filtered results this way provided you've created the filter properly in the view.
Why to create 2 pages ?
So far i was working perfect with just one page?
Can you give me a solution to have one page pls.
You can certainly use one page, but you'll need to write custom code. I shared with you what has become a best practice, because many Formidable users may not have the skill yet to develop the custom code required to use one page, but that doesn't seem to be an issue for you. Here's what you have to do:
Hide the view with CSS before the search form submits, and display the view with CSS after the search form runs. This means you have to develop code to track the form's state. You could use browser storage to do this.
You can also use browser storage to save/restore the search criteria so users don't have to re-enter their selections after a page refresh. This is what I do with the search for the Formidable Masterminds Developer Directory: https://formidable-masterminds.com/developers-directory/
I fix the problem
Now it works as before, perfect i can say
And All in one page
Thanks
Hello Chris! I have run into the similar problem, but my problem is '"No Entries Found' even after I refresh, can you tell me how youfix the problem? THX
Please login or Register to submit your answer
Hello,
It seems there's a glitch in the search functionality as it's displaying "No Entries Found" until the page is manually refreshed. Check the code to ensure the search feature accurately filters results without needing a page reload.