Hi,
I have a database that I display on my site. I have the form above the view which i use to filter the results. Is there a way to filter results without the webpage needing to refresh?
Thanks!
It is just a view. Formidable has a whole video on building a "Database" using a view which is why I used that term.
I wish Formidable's docs wouldn't say things like that. It's misleading and the terminology causes confusion. Either way, the rest of the answer still applies.
That's an interesting architecture. What do mean by searchable 'views'? How are you initiating a search?
I used the tutorial on the Formidable site to create my search.
https://formidableforms.com/knowledgebase/create-custom-search-form/
I have a data entry form which holds entered data as well as uploaded data.
I have a Grid 'view' (which looks more like excel table) which displays the data.
Then i created a search 'form' which connects to the 'view' to search it and display search results only.
I enterer a word to search for and click the 'search' button. At this point my page refreshes and i see the search results. But at the same time all my form data is lost.
This is very confusing. You have a data entry form and a search form on the same page? What data are you displaying in the view and what are you searching for? Search forms display data that has been previously been entered. When you enter a search it triggers a form submit. There is no work around to this when you have multiple forms on a single page. You are handing priority to one form over the other. There are ways to solve this but all require advanced programming by and experienced.
I wouldn't use a search form at all. I would AJAX to trigger a search on the server and replace your view content without refreshing the page or triggering a form submit.
That's not the only way to do it either. There are other ways, but I wouldn't recommend them to anyone without significant WordPress/Formidable Forms experience, because it requires creating WordPress templates or custom add-on. Not many small business have the budget for that.
<p>thanks for the input. The form is essential for keeping track of vehicle bids/appraising. Formidable has enough features to do minor calculations and then storing the data for each appraisal. In the search forms on the same page i search up recent appraisals and another data set of market data that assists in appraising the current vehicle. In Form setting there is the settings for AJAX - 'Submit this form with AJAX' (the pop info says it will submit the form without refreshing the page) I was hoping this might solve the issue, but it seems to do nothing whether it is checked or unchecked,</p>
You can sure try it but it's not going to help because in order to show the retrieved data, you must refresh the page.
AJAX is the solution but is is custom code. You have to write PHP code to create the callback function for the jQuery you need to create to pass the right REQUEST payload so you can received and process the RESPONSE. If you've never this type of coding before, make an appointment to map out a plan with a developer maybe as mentor even if you want to do it yourself and need a extra pair of eyes to make sure it's done right.
For a developer to write the code, it might cost you $1k or more USD to produce the code you need. Don't rely on ChatGPT either. I have never seen it produce correct code for Formidable. It's always too form generic and needs much modification. Good luck with your project.
Please login or Register to submit your answer