Hi,
I'm running joomla 3.9.19 with fabrik version 3.9.2 (updated recently),
And when I did the update on fabrik got an issue with date fields I had not any poblem before
the user would edit the date\time... thet where doing this by editing directly without the time selector but now that is not possible because the field do not register the time, it goes to 00:00 when the user changes the focus to another object.
I had php plugin in the event "start of form submission" to process the date/time
So... I got da date/time from the form :
$datho_ent = $formModel->getElementData('dataho_ent', true);
$datho_rec = $formModel->getElementData('dataho_rec', true);
and then I would do an update on a table :
$myQuery->clear();
$myQuery->update('jooro')
->set('dataho_entrega= ' . $myDb->quote($datho_ent ))
->set('dataho_recolha= ' . $myDb->quote($datho_rec ))
->set('dat_trans = ' . $myDb->quote($datho_rec ))
->set('ho= ' . $myDb->quote($datho_rec ))
->set('maqid= ' . (int) $maqid)
->where($conditions1);
$myDb->setQuery($myQuery);
$myDb->execute();
but right now is not doing nothing and giving back the error :
"Unknown column 'Array' in 'field list'"
My guess is the date\time has passed to become an array but I've tried to capture the variable has an array and tried diferente positions in the array but got nothing back...
//$foo3=$formModel->getElementData('dataho_ent', true);
//$datho_ent = is_array($foo3) ? $foo3[1] : $foo3;
I'm sure I'm probably not seeing something very obvious but sadly I'm stuck and I do have to make the upgrade in my production site, so I got to solve this, any help is very much apreciated...
I'm running joomla 3.9.19 with fabrik version 3.9.2 (updated recently),
And when I did the update on fabrik got an issue with date fields I had not any poblem before
the user would edit the date\time... thet where doing this by editing directly without the time selector but now that is not possible because the field do not register the time, it goes to 00:00 when the user changes the focus to another object.
I had php plugin in the event "start of form submission" to process the date/time
So... I got da date/time from the form :
$datho_ent = $formModel->getElementData('dataho_ent', true);
$datho_rec = $formModel->getElementData('dataho_rec', true);
and then I would do an update on a table :
$myQuery->clear();
$myQuery->update('jooro')
->set('dataho_entrega= ' . $myDb->quote($datho_ent ))
->set('dataho_recolha= ' . $myDb->quote($datho_rec ))
->set('dat_trans = ' . $myDb->quote($datho_rec ))
->set('ho= ' . $myDb->quote($datho_rec ))
->set('maqid= ' . (int) $maqid)
->where($conditions1);
$myDb->setQuery($myQuery);
$myDb->execute();
but right now is not doing nothing and giving back the error :
"Unknown column 'Array' in 'field list'"
My guess is the date\time has passed to become an array but I've tried to capture the variable has an array and tried diferente positions in the array but got nothing back...
//$foo3=$formModel->getElementData('dataho_ent', true);
//$datho_ent = is_array($foo3) ? $foo3[1] : $foo3;
I'm sure I'm probably not seeing something very obvious but sadly I'm stuck and I do have to make the upgrade in my production site, so I got to solve this, any help is very much apreciated...