Hi guys,
I am new to chronoforms and it's kind a great component and lots of features. I have a problem loading the data base from user who is logged in. I have created a form and a table for the form. I can't load the data entered after successful form submission. I have read the FAQ but I can't get it to work. Please help.
Thanks.
I am new to chronoforms and it's kind a great component and lots of features. I have a problem loading the data base from user who is logged in. I have created a form and a table for the form. I can't load the data entered after successful form submission. I have read the FAQ but I can't get it to work. Please help.
Thanks.
Hi nhinzky,
What code are you using to get the User ID?
What do you see when you add a Debugger to the form On Submit event?
Bob
What code are you using to get the User ID?
What do you see when you add a Debugger to the form On Submit event?
Bob
Hello,
Thanks for the reply. This is the code I added in conditions box:
and this:
I also add a debugger just like what you suggest but I can't see any logs on screen. This is the screenshot:
Thank you.
Thanks for the reply. This is the code I added in conditions box:
I also add a debugger just like what you suggest but I can't see any logs on screen. This is the screenshot:
Thank you.
Here are the screenshots attached..
[attachment=0]2014-10-02_2055_001.png[/attachment]
[attachment=1]2014-10-02_2055.png[/attachment]
[attachment=2]2014-10-02_2053.png[/attachment]
[attachment=0]2014-10-02_2055_001.png[/attachment]
[attachment=1]2014-10-02_2055.png[/attachment]
[attachment=2]2014-10-02_2053.png[/attachment]
Hi nhinzky,
The code you have in the Conditions box adds the user ID to the $form->data array but doesn't set a WHERE condition for the query, Please try:
Bob
The code you have in the Conditions box adds the user ID to the $form->data array but doesn't set a WHERE condition for the query, Please try:
<?php
$user = JFactory::getUser();
return ( array( 'user_id' => $user->id) );
?>assuming that the User ID column in the table is named 'user_id'.
Bob
Hello Bob,
I tried your code where I replaced with the snippet you posted but it still won't populate the form. I have attached here the On Submit DB Save settings: [attachment=0]save-shot.png[/attachment]
Thanks.
I tried your code where I replaced with the snippet you posted but it still won't populate the form. I have attached here the On Submit DB Save settings: [attachment=0]save-shot.png[/attachment]
Thanks.
Hi nhinzky,
I'm confused :-(
Is the problem with loading data from the database or saving it to the database?
Bob
I'm confused :-(
Is the problem with loading data from the database or saving it to the database?
Bob
Hello Bob,
As I check earlier, no data has been save to table after submission so my problem is the saving data to database, where I tried to use other form to test and it saves data but still won't load it to form. As I check the table fields the user_id is the user name in users table and in the table created in chronoforms is integer.
Thanks.
As I check earlier, no data has been save to table after submission so my problem is the saving data to database, where I tried to use other form to test and it saves data but still won't load it to form. As I check the table fields the user_id is the user name in users table and in the table created in chronoforms is integer.
Thanks.
Can you please give me some tips on how to make it work, the saving and loading the data to form based from the user logged in?
Thank you very much.
Thank you very much.
Please post a screenshot for your "designer" section to check your fields names!
Also please add a "debugger" action after the "db read" and post the debug results shown on the form page!
Regards,
Max
Also please add a "debugger" action after the "db read" and post the debug results shown on the form page!
Regards,
Max
Hello Max,
Thank you for your help. Here are the screenshot attached.
[attachment=0]Administration 2014-10-07 14-12-26.png[/attachment]
[attachment=1]debugger-shot.png[/attachment]
Thanks.
Thank you for your help. Here are the screenshot attached.
[attachment=0]Administration 2014-10-07 14-12-26.png[/attachment]
[attachment=1]debugger-shot.png[/attachment]
Thanks.
Good, now we need 2 more screenshots, one for the setup, and another for the "db read" settings!🙂
Also please note that you should not load the "password" field to the form, because its encrypted, and if you try to save this then some problems may occur!
Regards,
Max
Regards,
Max
Hello,
Here are the screenshots attached.
[attachment=0]setup-shot.png[/attachment]
[attachment=1]dbread1.png[/attachment]
[attachment=2]dbread2.png[/attachment]
Thanks.
Here are the screenshots attached.
[attachment=0]setup-shot.png[/attachment]
[attachment=1]dbread1.png[/attachment]
[attachment=2]dbread2.png[/attachment]
Thanks.
Ok, do you have any db records for this user id ? maybe there are not any to find ?
This topic is locked and no more replies can be posted.
