How can we do alternative data in Chronoforms v8?
I have a number of fields I use it for in order to properly save data.
Example: a number field that can be left blank. When it has a value, it saves properly. When it doesn't, the query tries to pass '' which fails as an "invalid number".
In CF7, I handled this with "Alternative Data" set up on the field where value = (blank) then override "{const:null}"
I can't find the equivalent in CF8?
I ended up using a php loop to go through and do this.
foreach ($this->data as $key => $value) {
if (is_string($value) && trim($value) === '') {
$this->data[$key] = null;
} }
Max, I'm assuming there's no direct solution like in CF7 by using "alternate data" on the fields?
Hi gotpowr
Your solution is good, I have added a NULL fields behavior to the next update to do just that, you will be able to set the fields in the Save Data action settings as shown below:

