DB Read, doesn´t work

Krikov 07 Feb, 2014
Hi to all.

I´m trying to show the data who are inside my DB into a normal article. I´ve tried to create a vanilla form and only use those commands, but it still don´t working. I ´ve try to put in load section. DB Read and Html, but i don´t know how to do that.


PD: Some pics, for best understanding of what is my problem
DB Read, doesn´t work image 1
DB Read, doesn´t work image 2


Thanks
wnedoe 07 Feb, 2014
CF5 is the wrong tool/component to do this.

CF ist mostly a solution to create forms and INSERT data into dbs or send them by email not to display data from a db.

Use Chronoconnectivity5 instead or Joodb.

regards
Alex
vales 07 Feb, 2014
You have tried to put db read before of html
wnedoe 08 Feb, 2014
The db read will read the data into the array (- yes-vales you are right - if put before the HTML) but they won't be displayed in an easy way. - yes you could insert one or more custom fields in the form and pull the field values of a single record from the db with the php shown below, but I am not sure if this is what Krikov wants

In the designer (advanced view) you pull in a "custom" element from advanced to the form and for each field you want to display - you insert the following code (replace model_id by your model id e.g. 'data' and replace field be your field name) into the "code" box:

<? echo $form->data['model_id']['field'] ; ?>

But this would only display one record. (the one selected with the condition - for explanation of what to enter there - see other posts of me.)
GreyHead 08 Feb, 2014
Hi,

You can show multiple rows by using code like that in the previous post and adding it to a PHP loop. If you add a Debugger element to your form ON Load event temporarily you should be able to see the structure of the data array and use that to build the code you need.

Bob
razlie 19 Feb, 2014
Hi Bob,

I got this message when i used the debug ,
Array
(
[option] => com_chronoforms5
[chronoform] => keputusantawaran
[eBor] => Array
(
[0] => Array
(
[eBor] => Array
(
[session_profail] => xxxx
[id_profail] => xxx
[ic_baru] => xxxx
[nama_penuh] => xxxxx
[type] => xx
[bidang] => xxxx
[fakulti] => xxx
[unitawar] => xx
[lvl2] => 1
)

)

)

)

But when i but in the custome code the code <?php echo $form->data['eBor']['ic_baru']; ?> nothing comes out... what i did wrong ??
JGLamber 03 Mar, 2014
I have the same problem. I´m trying to edit data in my form. In chronoforms v3 I had the profile plugin . I have to put the field id, the table and the request parm. If I make a URL call with the id or token I can see my form with all the fields filled with the data that belongs of that "Id" and I can edit al data and save those new data.

But in the CF V5 I don´t know how to do it.

I think that is what krikov is asking.
razlie 04 Mar, 2014
Oh i got it works...

The debug really helps... well this shows i need to disable multiread and also need to delete modelID as it call my ModelID twice...
This topic is locked and no more replies can be posted.