VIEWS - Showing a simple list and details on same page from same form

By: Michael Thomas | Asked: 08/31/2022
ForumsCategory: How-toVIEWS - Showing a simple list and details on same page from same form
Michael Thomas asked 2 years ago
Hi all, I'm trying to create a page where a list of items are shown on the left handside and when the user clicks the item the details of that item appear on the right side. I've tried creating the following :- 1 - Create a form A that collects item, detail 1, detail 2 etc
2 - Create 2 views.  
3 - View A - Displays items from form A as a list
4 - View B - Displays the detail link from View A (when clicked)
5 - Publish both Views onto Page A.

The issue is when the user clicks on the detail at View A, the page clears to view B, clearing view A. ¬†Ideally I want the two boxes to appear on the same page and only box B updates when an item is selected a A. Any ideas anyone? I've attached a screenshot.      
Attachments
Question Tags:
Rob LeVineRob LeVine replied 2 years ago

While it's not exactly what you're looking for (because the details are shown in a popup), WPDatatables just added an add-on for master-detail views. https://wpdatatables.com/documentation/addons/master-detail-tables/

1 Answers
Best Answer
Bobby Clapp answered 2 years ago
I don't know the official way, but if you have them both in Divs or some other HTML element, you could hack something together with an ajax request to reload the content of the second Div with the selected entry ID or key. You'd probably want to add a class and the class of the first Div would be the ID or entry key. That is quite a bit much to write up in these forums.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right