I am migrating a chronoforms v5 to v7.
In v5 I have a date check. The form should only be displayed and accessible on the days before or after the date in the config.
In the Event Switcher I have this code
How can I do this check in v7
In v5 I have a date check. The form should only be displayed and accessible on the days before or after the date in the config.
In the Event Switcher I have this code
<?php
$datetime1 = new DateTime();
$etdatum = $form->data['config']['pubendindiform'];
$datetime2 = new DateTime($etdatum);
//echo $etdatum;
if ($datetime1 > $datetime2)
{
return "fail";
// echo "<h2>Je bent helaas te laat om dit formulier in te vullen!</h2>";
}
//if ( isset($form->validation_errors) && count($form->validation_errors) > 0 )
{
// return "fail";
}
?>
How can I do this check in v7