Buy Now
Sign in

Edit function to a table

MTUG , June 17 2020, 13:13
M
MTUG 24
June 17 2020, 13:13 #393120
Hi,
I have created similar table as in the demo with a edit function: https://prnt.sc/t1fjgm
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: https://prnt.sc/t1fksz
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: https://prnt.sc/t1fnxd

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 Projekt.name ?
2nd issue, do you have the id hidden field in your edit form ? that's necessary to update an existing record.
M
MTUG 24
June 18 2020, 06:53 #393134
Hi,
For my first issue, i think im using the correct name:
see this screenshot https://prnt.sc/t1v5pz
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:
https://prnt.sc/t1v7jl
second issue. i have the id hidden field, https://prnt.sc/t1v85m
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 ?
M
MTUG 24
June 23 2020, 06:10 #393212
https://prnt.sc/t4rbtm
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 ?