Hi.
I'm having difficulty to save AND insert.
I made a form that's receive a parameter ID with a number, to edit a record, or zero, to insert a new one.
If I use action is on Auto detect, works ok to edit, but don't insert.
If I use action Insert - duplicate key update, works ok to insert, but insert a new record when I tried to edit.
My ID value is passed as parameter, then I recover it with
$form->data['id']=$_REQUEST['id'];
and in the save block I use
{data:id}
I'm having difficulty to save AND insert.
I made a form that's receive a parameter ID with a number, to edit a record, or zero, to insert a new one.
If I use action is on Auto detect, works ok to edit, but don't insert.
If I use action Insert - duplicate key update, works ok to insert, but insert a new record when I tried to edit.
My ID value is passed as parameter, then I recover it with
$form->data['id']=$_REQUEST['id'];
and in the save block I use
{data:id}