Hi, I would like to check the current date before showing a form. The form should be open specific days of the month for a year. In the remaining days of like 'Subscription closed'.
Example. The form is open from 7 to 10 each month for a year.
Can this be done?
Thanks in advance!
Example. The form is open from 7 to 10 each month for a year.
Can this be done?
Thanks in advance!
Hello Maxvl,
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?
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?
P.S: I'm just an automated service😉
Hi Maxvl,
You can use an "Event switcher" action and the code below:
you should have an "ok" event in the event switcher with the "show html" action inside it.
You can read more about the event switcher here:
http://www.chronoengine.com/faqs/70-cfv5/5212-event-switcher.html
Best regards,
Max
You can use an "Event switcher" action and the code below:
<?php
if(date("d") >=7 OR date("d") <= 10){
return "ok";
}
you should have an "ok" event in the event switcher with the "show html" action inside it.
You can read more about the event switcher here:
http://www.chronoengine.com/faqs/70-cfv5/5212-event-switcher.html
Best regards,
Max
Hi Maxvl,
The code you have here will only show the message - it won't close the form.
You would need to add the HTML (Render Form) action in the ok event and put a ShowStopper after the Event Switcher.
Personally I'd probably do this the other way round. Have a 'closed' event when the form is not open and add a Message + Show Stopper in there.
Bob
The code you have here will only show the message - it won't close the form.
You would need to add the HTML (Render Form) action in the ok event and put a ShowStopper after the Event Switcher.
Personally I'd probably do this the other way round. Have a 'closed' event when the form is not open and add a Message + Show Stopper in there.
Bob
This topic is locked and no more replies can be posted.
