Update form with new inser id

Update a CF form with the new database insert ID after saving data.

Overview

The user needs to use the newly generated primary key for dependent operations without resubmitting the form.
After the DB Save action, the new record ID is available in the form data array. Use a Debugger action to locate and access this value for further processing.

Answered
ChronoForms v5
we webcrea 17 Oct, 2017
Hello,

I would want to update a form with the new insert id created after a save data.

I need it because i have some dependencies. I need to know primary id to create new insert without submit form and recall it.

A json for example ?

Thanks
Gr GreyHead 18 Oct, 2017
Answer
1 Likes
Hi Christophe,

The new record id is added to the $form->data array after the DB Save - you can get it from there. Add a Debugger action temporarily to see where the value is.

Bob
This topic is locked and no more replies can be posted.