Hello
Is the idea to make the table, as shown below.
[attachment=0]Table.jpg[/attachment]
How can this be implemented? To read out the data from a specific table in the database and displayed in a table.
But also to add any control elements (eg checkbox) and are consistent with the data in row.
Perhaps this is done with the help of Columns. But I think that I'm moving in the wrong direction.
[attachment=1]Table2.jpg[/attachment]
Please help solve the problem ...
Is the idea to make the table, as shown below.
[attachment=0]Table.jpg[/attachment]
How can this be implemented? To read out the data from a specific table in the database and displayed in a table.
But also to add any control elements (eg checkbox) and are consistent with the data in row.
Perhaps this is done with the help of Columns. But I think that I'm moving in the wrong direction.
[attachment=1]Table2.jpg[/attachment]
Please help solve the problem ...
On a tab of design have added the field and have placed a code there
It was necessary to attach to data. It is necessary to understand still how to make compliance to every line.
That it was possible to define what of checkboxes it is clicked. It is possible to eat more correct realization, than mine?
I apologize for English. I use the translator.
<table border="1" bordercolor="#000">
<?php for ($i = 1; $i <= 10; $i++) {?>
<tr>
<td><div class="form-group gcore-form-row" id="form-row-checkbox3">
<label for="checkbox<?php echo $i;?>" class="control-label gcore-label-left gcore-label-checkbox">Label <?php echo $i;?></label>
<div class="gcore-input gcore-display-table" id="fin-checkbox<?php echo $i;?>">
<input name="checkbox<?php echo $i;?>" id="checkbox<?php echo $i;?>" value="1" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" />
</div>
</div></td>
<td><?php echo $i;?></td>
<td><?php echo $i;?></td>
</tr>
<?php }?>
</table>
It was necessary to attach to data. It is necessary to understand still how to make compliance to every line.
That it was possible to define what of checkboxes it is clicked. It is possible to eat more correct realization, than mine?
I apologize for English. I use the translator.
Sorry. On a tab of design have added the *Custom code* and have placed a code there
In a tab of design has added a Custom code and the Submit button.
[attachment=0]01.jpg[/attachment]
The Custom code has such contents:
In a tab Setup, loading events, before (Render form) has added the DBread.
In the Submit event has added DBread. A after also Custom code too.
[attachment=1]02.jpg[/attachment]
In both readers the table of users (#__users) is chosen. Multi reading is also established.
Model ID is DataSS. List of fields is name, id.
The Custom code contains it:
If to whom it is interesting, then can improve and use everything in the needs.
Thanks to myself, could understand.
[attachment=0]01.jpg[/attachment]
The Custom code has such contents:
<table border="1" bordercolor="#000">
<tr>
<td><p>Select</p></td>
<td><p>Name</p></td>
<td><p>ID</p></td>
</tr>
<?php
foreach ($form->data[DataSS] as $key => $value) {
?>
<tr>
<td><label for="checkbox<?php echo $key;?>" class="control-label gcore-label-left gcore-label-checkbox">Take <?php echo $key+1;?></label>
<input name="checkbox<?php echo $key;?>" id="checkbox<?php echo $key;?>" value="<?php echo $value[id];?>" class="A" type="checkbox" /></td>
<td><?php echo $value[name];?></td>
<td><?php echo $value[id];?></td>
</tr>
<?php }?>
</table>
In a tab Setup, loading events, before (Render form) has added the DBread.
In the Submit event has added DBread. A after also Custom code too.
[attachment=1]02.jpg[/attachment]
In both readers the table of users (#__users) is chosen. Multi reading is also established.
Model ID is DataSS. List of fields is name, id.
The Custom code contains it:
<table border="1" bordercolor="#000">
<tr>
<td><p>Select</p></td>
<td><p>Name</p></td>
<td><p>ID</p></td>
</tr>
<?php
foreach ($form->data[DataSS] as $key => $value) {
if ($form->data[checkbox.$key]==$value[id]){
?>
<tr>
<td><?php echo Selected;?></td>
<td><?php echo $value[name];?></td>
<td><?php echo $value[id];?></td>
</tr>
<?php }
}?>
</table>
If to whom it is interesting, then can improve and use everything in the needs.
Thanks to myself, could understand.
This topic is locked and no more replies can be posted.