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
v7 has a WatchMan behavior in the form settings to do that, please check it and let me know if you need help!
Thank you,
Yes, I found the WatchMan behavior but:
Yes, I found the WatchMan behavior but:
- there seems to be a difference in time that i configure in the WatchMan and the local time (Netherlands). I think WachtMan is 2 hours behind. Is there a way to adjust the "WatchMan time"
- Is there a way to customize this message ?
- Or to redirect to a custom page?
#1- I think I found a bug at this part, you may wait for the next update to get it fixed!
#2- yes, there is a failure page setting at the watchman plugin, set it to a page in your form and it's going to open that page instead, make sure that page is inside it's own page group with type (standalone)
#2- yes, there is a failure page setting at the watchman plugin, set it to a page in your form and it's going to open that page instead, make sure that page is inside it's own page group with type (standalone)
You need to login to be able to post a reply.