Forums

loading and editing a DB record via a form

thewelt 06 Apr, 2016
HI,

When a user is logged in, I want to let him change his personal (previously added) data via a form
I use a DB table with information such as workstatus, availability, preferences, etc...

Is there a way to do so via Chronoforms V5 and if so, where can I find a tuturial?

I already experimented with DB read and DB safe, but added data can't be overwriten.

Tnx,
Bart Weltens
thewelt 06 Apr, 2016
I used to fix this but since I upgraded to joomla 3.5, it doesn't work anymore 😟
GreyHead 06 Apr, 2016
Hi Bart,

Please see this FAQ. I'm not clear what isn't working in Joomla! 3.5?

Bob
thewelt 06 Apr, 2016
It seems like the record in the table is not overwriten? A new record is added.
thewelt 06 Apr, 2016
I add screenshots form form page1 and debug info.
GreyHead 07 Apr, 2016
Hi thewelt,

Please see this FAQ for the messages.

I can't see any DB Save query in the Debugger output you posted, The problem may be with the value of id that is set in the form data [id] = 11 - is this the correct record to update?

Bob
thewelt 08 Apr, 2016
Hi Bob,

For the messages it's OK. Tnx for the tips.

But for de DB safe action i't not OK. It should be saving on record 11 but instead it saves a new record (157).
See screenshots.

Bart (thewelt)
GreyHead 09 Apr, 2016
Answer
Hi Bart,
You have [id] = 157 in the form data so that is the record that is being updated. If that isn’t the value of id you want to use then you need to unset it - or change the name of the Primary Key column in the table. This problem usually happens when the form is shown in an article and the article id gets picked up from the page URL.

Please see this FAQ

Bob
thewelt 09 Apr, 2016
tnx Bob.
I got it working.
This topic is locked and no more replies can be posted.