Chronoforms v8 - Save Data action - do I need separate for insert/update

How to handle insert and update with ChronoForms v8 Save Data action.

Overview

The Save Data action updates when a Where Condition is set and inserts when none is set, so a single action cannot do both.
Create two separate Save Data actions, one without a Where Condition for inserts and one with the ID Where Condition for updates, then use a Switcher action to choose between them.

Answered
ChronoForms v8
go gotpowr 11 Sep, 2026

When using a "Save Data" action to save data into a custom table, do I need to create a separate one for an insert and update with a different where condition?

I've only done the insert before by setting Modify Fields and having the "ID" field in the database mapped to {const:null}, I'm assuming I need that for an insert and "ID={Data:id}" for update?  

Max_admin Max_admin 9d ago
Answer

Yes, basically the Save Data will update if there is a Where Condition set, otherwise it will try to Insert, you will need a Switcher action to switch between the 2 Save Data

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
go gotpowr 7d ago

Hi Max,

So I have 2 different things I've seen so I want to make sure I'm doing this the correct way.

Originally I tried using 1 save method, but was seeing weird issues with updating vs inserting.

So for most of my forms, I created 2 saves with different "run conditions" - 1 with the ID being blank (for new) and 1 with the ID having a value (for updates)

But then as I recreated/converted some additional forms, I got a single save to work properly with where conditions and where statement (pictured below):

Chronoforms v8 - Save Data action - do I need separate for insert/update image 1

I'm not sure why my others were giving me issue (for the others I did not use "data" as the datasource, i used the "modify data source" and manually set fields.  Not sure if that impacts it at all, or just using a combo of where conditions and where statement were enough?

Thanks!

Post a Reply