Forums

Updates not actually saving

cmwincom 16 Feb, 2025

I have a simple table listing where sometimes the data needs to be updated. I've created a link in the table to edit the data. The link works and displays the data properly. Only the event, discipline, or points data will be changed. The first two are dynamic dropdowns and points is a text field. Right now if I change anything it get the message that it was a success, but when I check nothing in the record has changed. I have another form that is used for updating data in a different table and that works with no issues. Trying to figure out why this one isn't.Here's the table listing on the front end...Here's the edit form in the frontend.

Backend form view.

Save Action

cmwincom 18 Feb, 2025

Hello, is anybody out there? I would think there is a solution to this problem as to why a record isn't actually updating. Updating on another form works. I've even tried duplicating on another site. Simplified the table to just three columns and the same thing. It reports that it was successful, but when I refresh the listing the old value is still there.

Max_admin 19 Feb, 2025
Answer

Hi

Your form should have a field with the Primary Key value of your row, if your primary key is "id" then have a field named "id" with the value of the "id" column in your row, that should run the update

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmwincom 21 Feb, 2025

pid is the primary key and is in the form as a hidden field. It's based on the Basic Article List form.

Max_admin 22 Feb, 2025

is it correctly populated ? you may use a text field for the pid field to be sure it's available before save

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmwincom 22 Feb, 2025

Yes, it is populating correctly.

Max_admin 22 Feb, 2025

check the debug after the form is submitted, what SQL query is being executed ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmwincom 23 Feb, 2025

Here is the debug after editing the first record and changing points from 10 to 9. When I view the table listing the points value is still 10.

Max_admin 23 Feb, 2025

The INSERT statement does not include the points column, and the data array has points under "r", which means that it will not be saved unless you set the points column value using the Modify Data Source in Save Data

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmwincom 23 Feb, 2025
1 Likes

Assuming this is what you mean, I have it working now. Is there an easier way I could have done this and not need to Modify Data Source in the Save Data Action?

Max_admin 23 Feb, 2025

yes, this is the correct solution in v7, but v8 has Modify Data Source to do the same thing

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmwincom 23 Feb, 2025

Thanks for the help. I've dabbled with v8 a little, but I haven't been successful in duplicating the function and look of my v7 forms yet.

You need to login to be able to post a reply.