Datetime() in Email Form plugin error (condition field)

thellie

Member
In the condition field I'm trying to rows which have not yet had the email sent (yesno element) and a datediff to make sure the new volunteer arrives in a week.

Without the datetime part of the code, it works properly. The same datetime code works properly in calc elements, so I think it's an issue with the email form plugin...?

Code:
$date1 = new DateTime('{vol_appform___startdate}');
$date2 = new DateTime();
$interval = $date1->diff($date2);

$your_radio_element = '{pickup_email_sent_raw}';

if($your_radio_element === '0' && ($interval/7)==='1')
{
      return true; //email will be send
}
else{
      return false; //email will not be send
}

I get the following error:

Code:
DateTime::__construct(): Failed to parse time string (<a data-loadmethod="xhr" class="fabrik___rowlink fabrik_edit" data-list="list_11_com_fabrik_11" data-isajax="0" data-rowid="" data-iscustom="0" href="/administrator/index.php?option=com_fabrik&task=form.view&formid=11&rowid=" > 29.07.2019</a> ) at position 0 (<): Unexpected character
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top