Forums

Display in form data fm db

mrmix 23 Nov, 2015
Hi everybody,
I started learning CF5, I created a form with 4 fields and saved data in a db table. Everything worked great.
Now I'd like to retrieve the saved data into this new form, I created another form and in Designer I named 3 fields
with the same names of the previous form and added a submit button. In Setup, in OnLoad I added DBRead and HTML
Render Form. In On Submit I just inserted Debug.
In Basic from DBRead Edit I selected the db table and I wrote in Fields and Order the fields name that I'd like to be shown.
I saved and clicked Test form, I clicked on submit button but nothing was shown.
Here below the debug log
Thank you for your help.

Regards,

Bob

Debug log:
Data Array

Array
(
    [option] => com_chronoforms5
    [chronoform] => retrieve_db
    [event] => submit
    [nome] => 
    [cognome] => 
    [docente] => 
    [button4] => Submit
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
)
GreyHead 23 Nov, 2015
Hi Bob,

How are you identifying the record that you want to re-load?

Is the DB Read enabled? There is no output from it in the Debugger output you posted? You should be able to see the MySQL query.

Bob
mrmix 24 Nov, 2015
Hi GreyHead,

thank you for yr reply.

I wrote the db table name into the field 'Table Name' in DBRead.

Bob
GreyHead 24 Nov, 2015
Hi Bob,

That will identify the table - but not the record in the table. You presumably have something in the Conditions box to do that. Please see this FAQ

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