Hi, I would like to check the current date before showing a form. The form should expire on a specific date and show an notification like 'Subscription closed'. Can this be done?
Thanks in advance!
Thanks in advance!
Hello Kwalitijd,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I format a date in the datepicker?
Date control using CFv5 date picker element
How can I set a default date for a datepicker?
How can I set start and end dates for a datepicker?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I format a date in the datepicker?
Date control using CFv5 date picker element
How can I set a default date for a datepicker?
How can I set start and end dates for a datepicker?
P.S: I'm just an automated service😉
Hi Kwalitijd,
Yes, you can do this. Add an Event Switcher from the Validation Actions group in the beginning of the form On Load event. Open the settings and, in the Events box replace success,fail with closed. Save and Close the Event Switcher, re-open it and click the Load Events button. When you Save and Close again you should now have just an On closed event.
In the Code box add something like this:
Then in the On Closed box you can redirect to a different page with a message. Here's one way of doing that with another Custom Code action:
Bob
Yes, you can do this. Add an Event Switcher from the Validation Actions group in the beginning of the form On Load event. Open the settings and, in the Events box replace success,fail with closed. Save and Close the Event Switcher, re-open it and click the Load Events button. When you Save and Close again you should now have just an On closed event.
In the Code box add something like this:
<?php
if (time() > strtotime("05/15/2015 4:00PM") ) {
return 'closed';
}
?>
Then in the On Closed box you can redirect to a different page with a message. Here's one way of doing that with another Custom Code action:
<?php
$app = JFactory::getApplication();
$app->enqueueMessage('Sorry, we&squo;re closed');
$app->redirect('index.php');
?>
Bob
This topic is locked and no more replies can be posted.
