Problem:
We have a form that we use to collect entries. This is our “database” which has a view to display all of our entries. Not all entries are relevant to all users.
We want the user to be able to select which database entries are relevant to their business and be able to display them on their dashboard page.
Finally, we want the user to be able to go back to update or change their selections and for their previous selections to still be there.
Solution:
We created a second form with a user id field and a dynamic field (checkboxes) that holds all of the titles of each entry in our database. The user will use this form to make their selections. Now we create a view from that form which we will call “Dynamic Selection”. In the content section of this view we write “[3696 show=id],” // change 3696 to your dynamic field. (Make sure the comma is there after the closing bracket). Now we’ll add the standard “User ID = current_user” filter along with sorting by “Entry Creation Date = Descending”. Finally, set the “limit = 1”. Now we have a view that has our most recent entry ID for the current user.
After everything is set up correctly, copy the view shortcode and go back to the database view (first form’s view). Here we will add the filter “Entry ID = [display-frm-data id=17347]” // paste your own view shortcode. Now we have a dynamic field being used to filter the databases entries based on the checkboxes that are selected for that current user.
Now for the final part, we are simply going to take our entry ID shortcode and paste it into the default value of the field in the Dynamic Field. This will make it so our checkboxes are always prepopulated with the user’s last selection.
One comment on “Filter View Dynamically”
Is there a video of this tutorial or are the steps still valid for the current version of Formidable Forms?
i've tried to follow the steps but am unable to get a filter to appear on the view with the entries i want to see