I´ve made a form that can be saved into a table. But now I need to load data in the same form using ìd` or token. I have read some tutorials in chronoforms v4 and in choronoforms v3 I used the profile page plugin. In those chornoforms´s version I only had to introduce de DB field, table and request param, but I don`t know how to do this with CF v5. I need to load these fileds shown in the form and I need to edit those fields to be saved in the same row.
I have no problem with db save, I can save new forms in the table and It works fine, but I need to load the data of a saved form-data that has been introduced previosly to edit their fields. I think I have to use db read. In CFv4 i can use DB record loader and in CF v3 profile page plugin , but I don`t Know how to do this in CF v5.
Hi belga77,
I think you are correct, you need to use the DB Read action (it's a merged DB Loader and DB Multi Loader) as far as I know - which is not a lot - it works more or less the same as the older actions.
Bob
I think you are correct, you need to use the DB Read action (it's a merged DB Loader and DB Multi Loader) as far as I know - which is not a lot - it works more or less the same as the older actions.
Bob
Ok, in the older versions of chronoforms I only had to introduce DB field, table and request param, but I don`t know how to do this in chronoforms v5 the items that i can use are different.
I´ve tried to edit my form data with DB read but I can´t. I don´t Know where is the DB field, and request parms.
If you could help me Iwould be very grateful.
Best regars.
If you could help me Iwould be very grateful.
Best regars.
Solved. I contact with Max and gave me the solution.
The db field name is the name of the column in your table (like DB field in CFv4) , and the request param is the name of the parameter in the url that we will use to call the form to edit.
For example If we want to edit the form witch its ID is 34, we have to write the URL http://mydomain.com/index.php?option=com_chronoforms5&chronoform=name of your form&id=34.
Previously we had to drag "DB read" to the "OnLoad" in the setup tab of our form. We have to drag "DB read" before "HTML (Render form)" , click edit "DB read" enable yes, select the table, then if we have a model id we can enable it, but if not we can leave it off, and finally we have to write the php code in the conditions box. We only have to change "db_field_name" for "id" and "request_param" for "id".
Thats all.
Thank you for your help.
Best regards.
You may use the conditions box:
<?php
return array("db_field_name" => $form->data("request_param"));
?>
The db field name is the name of the column in your table (like DB field in CFv4) , and the request param is the name of the parameter in the url that we will use to call the form to edit.
For example If we want to edit the form witch its ID is 34, we have to write the URL http://mydomain.com/index.php?option=com_chronoforms5&chronoform=name of your form&id=34.
Previously we had to drag "DB read" to the "OnLoad" in the setup tab of our form. We have to drag "DB read" before "HTML (Render form)" , click edit "DB read" enable yes, select the table, then if we have a model id we can enable it, but if not we can leave it off, and finally we have to write the php code in the conditions box. We only have to change "db_field_name" for "id" and "request_param" for "id".
Thats all.
Thank you for your help.
Best regards.
This topic is locked and no more replies can be posted.