Displaying Related Table Data in Admin Views and Forms in JCB 5.1.1 #996
-
Hi everyone, I'm having some trouble finding clear documentation and getting assistance from AI tools, so I'm hoping to get some help here. I'm developing a component using Joomla Component Builder (JCB) 5.1.1 and I have two main views/tables: View 1 (Table: attivita_commerciale): This view manages commercial activity types and includes fields like title and description. View 2 (Table: anagrafica): This view manages shop details (name, address, etc.). My goal is to display data from the attivita_commerciale table within the anagrafica views. Specifically: In the anagrafica list view (admin list view): I want to add a new column that displays the title from the attivita_commerciale table. In the anagrafica detail form view (admin detail form): I want to display a list (or a selection) of attivita_commerciale titles. What is the "official" or recommended way to achieve this within JCB? More specifically: What type of field should I use in the anagrafica detail form to display a list of attivita_commerciale titles? How can I link these two tables (anagrafica and attivita_commerciale) effectively in JCB to pull the title data into the anagrafica views? Any guidance or examples on the correct approach within JCB would be greatly appreciated! Thanks in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the solution in this video! https://www.youtube.com/watch?v=p34MqdZPReE&list=PLFUn7Lytj1u7IY4Fi2qQbN9Lk5k2E4K9j&index=6 |
Beta Was this translation helpful? Give feedback.
I found the solution in this video!
I watched hundreds of videos with terrible audio and terrible explanations before GOD answered me. I even ran some tests, inserting a query into the PHP of that view, and I have to say it worked 50% of the time. Unfortunately, my categories were in the list view filter, displayed with IDs!
https://www.youtube.com/watch?v=p34MqdZPReE&list=PLFUn7Lytj1u7IY4Fi2qQbN9Lk5k2E4K9j&index=6