display read-only data from another table

fanta00

Member
Is it possible to display 'read-only' data from another list on the detailed view? I tried joining two tables but then it also adds editable dropdown to the form which I don't want. I also tried using "Show related data links" form option, and it's kind of what I need but it only shows a link to the popup window, and I would like to have the elements printed directly on the details view within the form, not in a popup. How can I achieve that?
 
Hello,

Change access for element -set Editable to a higher level or use calc element to retrieve data from database and display it as read only
 
..... Or you could load the detail view via a the content plugin. You could do this via an element, (display, calc, field, text), or you could put it into your template.

I have no idea what you want to display but you can use placeholders as you would with a custom link to display the content.

An alternative is to use the display or calc element to run a query to display your elements. This however would be best suited for just a few elements otherwise you'll have to spend a bit of time on the layout.
 
Let's say I have 'Events' and 'Bands' lists, relation is many to many, so I created the Events_Bands list and when you edit the Events list you can choose which Bands are playing by choosing their names from the drop down together with the date, so they are placed in a repeatable group so you can add as many bands as you want. And that is all working fine. However on the 'Bands' form I want only to display a 'read-only' Events listing that this particular band is assigned to, without a drop down to assign events here.

I tried calc something like this:

$data = '{events_bands___event_id}'
echo '<pre>';print_r($data);echo '</pre>';exit;

or:
return (int)'{events_bands___event_id _raw}';

But the first one returns nothing, and the second one returns zero.

I'm not sure if the calc, display or text fields will actually work to display related data? If not what else can I use to display list of assigned events on band profile?
 
You could use a content plugin or a module as Felixcat suggests, with a prefilter to show only the bands' events
 
How can I include content plugin within form details view?
Is this correct way: I tried using display plugin and I've put this into default box:
{fabrik view=details id=4} where id=4 is an Events_Bands form id, but it displays this data:
Bands = 0
Where I want it to show the Events names here.
 
Back
Top