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
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.
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
pid is the primary key and is in the form as a hidden field. It's based on the Basic Article List form.
is it correctly populated ? you may use a text field for the pid field to be sure it's available before save
check the debug after the form is submitted, what SQL query is being executed ?
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.
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
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?
yes, this is the correct solution in v7, but v8 has Modify Data Source to do the same thing
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.
This tutorial shows how to build a table list with editable page in v8:
https://www.chronoengine.com/faqs/chronoforms/chronoforms8/create-a-table-list-in-chronoforms8