Buy Now
Sign in

Edit function to a table

MTUG , June 17 2020, 13:13
June 17 2020, 13:13 #393120
I have created similar table as in the demo with a edit function:
My problem is when i click on the edit button for the table item, the project name does not follow along to the next page.. the attributes of the item does follow but not the name:
the debugg shows that the proejct name is correct, so i guess the problem is not getting the value the problem is to view it on the field.
Second problem is when i change the name and save it. It saves as a new project it does not update the current project. The data save uses the setting Insert, if duplicate update.
In my database i use id as a primary key with auto increment, so when i click on a table item the id got incremented and when i save it saves it as a new item.

There should be a way to load the same id without increment it when i click on the table item right?
here is screenshot at the debug:

i know that all my problems are solved in the demo and i have followed it carefully but im missing something, if you could point me where to look i would be thankful
admin 32
June 17 2020, 14:30 #393123
First issue, the name field, are you sure your field has the correct name ? it should be Model.field, so I guess ?
2nd issue, do you have the id hidden field in your edit form ? that's necessary to update an existing record.
June 18 2020, 06:53 #393134
For my first issue, i think im using the correct name:
see this screenshot
i chose similiar field name for the dropdown menu as for the text field. it is working as expected for the dropdown menu but not for the text field.
The debugg shows that when i click on a random project i do get the correct project attributes with the correct name. but the name is not showed in the text field:
second issue. i have the id hidden field,
does the id hidden field import the id of the project automaticlly ?
admin 32
June 18 2020, 14:42 #393142
What are your "Read Project Data" settings ?
June 23 2020, 06:10 #393212
Here is a screenshot for my 'read project data' when i click on a specific project
admin 32
June 23 2020, 14:21 #393215
you do not have the "populate fields" behavior enabled ?