Hi,
I wanted to ask how I can display the data from a sub-table under View action.
The data in the main table so I can show in CC5:
<td> {Firma.name} </ td>
But if I want the members of the main table data stored in a second table indicate?
Modelname 2. table: Firma_1
As I have multiplier for the Designer (CF5) for the input fields: __N__
<td> {Firma.Firma_1.partner}</td> not working.
Thank you in advance for the help.
F.
I wanted to ask how I can display the data from a sub-table under View action.
The data in the main table so I can show in CC5:
<td> {Firma.name} </ td>
But if I want the members of the main table data stored in a second table indicate?
Modelname 2. table: Firma_1
As I have multiplier for the Designer (CF5) for the input fields: __N__
<td> {Firma.Firma_1.partner}</td> not working.
Thank you in advance for the help.
F.
Hello Fredolino,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I save form data to a database table?
How to load record data from a database table into your form
How can I show data linked to a drop-down option?
How can I edit my database table and debug queries?
How can I select 'types' in a database table?
How can I edit a record from a database table?
How can I build a chart to show data?
How can I add a new column to a database table or change a column type?
How can I set the order in the Data Displayer?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I save form data to a database table?
How to load record data from a database table into your form
How can I show data linked to a drop-down option?
How can I edit my database table and debug queries?
How can I select 'types' in a database table?
How can I edit a record from a database table?
How can I build a chart to show data?
How can I add a new column to a database table or change a column type?
How can I set the order in the Data Displayer?
P.S: I'm just an automated service😉
Hi Fredolino,
How do you want to show them?
ChronoForms only has one row for each record so you could setup a join to show one row for each record in the sub-table - and therefore several rows for each record in the main table.
Or you could possible use a Custom HTML entry to show a mini-table in each row. That might work if there are only a few sub-records.
Or you could add a link to each row to show the sub-records in a Modal window.
Bob
How do you want to show them?
ChronoForms only has one row for each record so you could setup a join to show one row for each record in the sub-table - and therefore several rows for each record in the main table.
Or you could possible use a Custom HTML entry to show a mini-table in each row. That might work if there are only a few sub-records.
Or you could add a link to each row to show the sub-records in a Modal window.
Bob
Hi Bob,
thanx for this information. :-)
Ok, i use a custom HTML entry to show a mini-table in each row.
Where can I find examples of how I can do that in my case?
F.
thanx for this information. :-)
Ok, i use a custom HTML entry to show a mini-table in each row.
Where can I find examples of how I can do that in my case?
F.
Hi,
i have this script, but is not ok.
i have this script, but is not ok.
<table>
<?php
foreach ($form->data['Firma_1'] as $d) {
echo "<tr>
<td>{$d['berufsfeld']}</td>
<td>{$d['position']}</td>
<td>{$d['spezifikation']}</td>
...
</tr>";
}
?>
</table>
Hi Fredolino,
I've never seen that done before so can't point you to an example.
In CCv5 the row data is in $row, (not in $form->data).
Bob
I've never seen that done before so can't point you to an example.
In CCv5 the row data is in $row, (not in $form->data).
Bob
Hi Bob,
it's a sub-table with multiple columns.
This sub-table is to be displayed in a cell of the main table in CC5.
I know otherwise not how that is different.
I once attached a screen by the debugger.
The data from the model "Firma" are displayed correctly. It's about the data model "Firma 1".
Thank you for your help.
F.
it's a sub-table with multiple columns.
This sub-table is to be displayed in a cell of the main table in CC5.
I know otherwise not how that is different.
I once attached a screen by the debugger.
The data from the model "Firma" are displayed correctly. It's about the data model "Firma 1".
Thank you for your help.
F.
I think that I do not find the solution currently. 🙄
<table>
<?php
foreach ($row['Firma_1'] as $d) {
echo "<tr>
<td>{$d['berufsfeld']}</td>
<td>{$d['position']}</td>
<td>{$d['spezifikation']}</td>
</tr>";
}
?>
</table>
Hi fredolino.
Please add echo $row; in there temporarily so that you can see what data is in $row, that may help.
Bob
Please add echo $row; in there temporarily so that you can see what data is in $row, that may help.
Bob
I do it still wrong ...
<table>
<?php
foreach ($form->data['Firma_1'] as $d) {
echo "<tr>";
echo "<td>"$row->{$d['berufsfeld']}"</td>";
echo "<td>"$row->{$d['position']}"</td>";
echo "<td>"$row->{$d['spezifikation']}"</td>";
"</tr>";
}
?>
</table>
Where do you have this code ? please try this to find the $row contents:
<?php pr($row); ?>
Hi Fredolino,
You do still do it wrong - please check your PHP carefully this is not valid PHP
Bob
You do still do it wrong - please check your PHP carefully this is not valid PHP
echo "<td>"$row->{$d['berufsfeld']}"</td>";
Try this insteadecho "<td>{$row->$d['berufsfeld']}</td>";
Bob
This topic is locked and no more replies can be posted.