List data from a database table

santosh.karkhanis 07 Jan, 2016
I wish to display data (number of records) from a database.
Is it possible using Chronoform?
How to use 'Custom Code' for the same?
FloB 08 Jan, 2016
Answer
Hi,

If you just want to display some data, you should use ChronoConnectivity instead of Chronoforms.

If you need ChronoForms, then you will have something like that:
On load event : DB read action (or equivalent to find the data) (Model id = my_data) + show html
On your form : custom code
<?php
foreach($form->data['my_data'] as $v){
$text=$text.$v['cell_1'].$v['cell_2'];
}
echo $text;
?>

You could format your data as you want (text, table...).

Hope this answer your question.
Florence
santosh.karkhanis 08 Jan, 2016
Great Florence, it works.
But I need a little more help, as I am not a coder by profession.
I am developing a site for my school in low income-group area.

Can you guide me on how to separate the different fields & arrange each record in a different row?

Regards
This topic is locked and no more replies can be posted.