Forums

Editing items leads to Insert instead of update

stikkimorey 14 Aug, 2018
Hi
I am struggling to create a form based on the dynamic actions demo. I have tried to copy the settings across accuratly, but when I try to use the edit link, it inserts a new record instead of updating the record chosen.

In the write action settings for the save event, I have selected auto, but it does not seem to recognise when to update.

Can anyone help me identify what the problem is?

Many thanks

Mikki
stikkimorey 14 Aug, 2018
The only thing I can see that I have diferent is that on the article edit link I have :

asset_id={var:articles_list.row.Article.asset_id}

Wheras in the demo, they have:

article_id={var:articles_list.row.Article.id}

I am using asset_id as the primary key in my table and it is set to auto_increment

Thanks

Mikki
stikkimorey 14 Aug, 2018
Ah I found the problem - I had named the field with the ID as asset_id but it needs to be Article[aset_id]
This topic is locked and no more replies can be posted.