user_id is not filled

How to fix user_id not being saved in ChronoForms database table.

Overview

The issue occurs when the user ID is not automatically captured for logged-in users, often due to incorrect conditions or configuration in the DB Save action.
Ensure the correct code is used in the Conditions box, remove any spaces in the Fields list, and verify that users are logged in to allow the user ID to be saved automatically.

Answered
Du DuW 27 Jan, 2015
Hey there,

I've a problem to read data from the table.

As you can see, I insert a DB read action to get the user information:
[attachment=0]db_read_action.jpg[/attachment]

But all users have user_id=0 in my chronoforms table:
[attachment=1]db_table.jpg[/attachment]

Here is the output from the debugger:
[attachment=3]debugger.jpg[/attachment]

Can you please help me?

Best regards,
Susan
Gr GreyHead 27 Jan, 2015
Hi Susan,

Several things here.

+ Please see this FAQ for the correct code to use in the Conditions box.

+ Please remove the spaces in the Fields list (I'm not sure if that's a problem here but it has been elsewhere in CF).

+ Are your users logged in? If they are then the user id should be saved automatically, if not then you will get a 0 for a guest user.

Bob
Du DuW 28 Jan, 2015
Answer
Hello Bob,

thanks for your answer.

+ I've changed the code.
+ I've removed the spaces.
+ I logged in with a test account, but the user id won't be saved.

I've tried it with a new datatable:
[attachment=0]db_user_id.jpg[/attachment]

Made a new registration and took a look in the datatable:
[attachment=1]db_table2.jpg[/attachment]

I haven't any idea why there's no user_id. I can get all information out of the joomla usertable when I'm logged in, but no data out of the chronoforms-table.
[attachment=2]debugger2.jpg[/attachment]

Best regards,
Susan
This topic is locked and no more replies can be posted.