I'm building internal erp based on joomla. main component for forms, database etc is Fabrik. At moment it's works great but I stuck on one field what I have problem to make working on way as I would like to. I have a form to edit previously entred data on another form. In this form one of field is Outstanding days. I use calc field type. Trouble is it's don't want to make required calculations. my php code for this field is:

$datetime1 = new DateTime(date("Y-m-d"));
$datetime2 = new DateTime(date_format({enquiries___due_date}, 'Y-m-d'));
return $interval;

The error was simple stupid mistake. I missing a qoute on {enquiries___due_date} when I place this in quote everything start working.

Not the answer you're looking for? Browse other questions tagged or ask your own question.