I have an event registration form with chronoforms v6 and would like to have add the functionality, that the form will not be displayed after a certain date, which I load with Read Data from the DB.
Then I could add an if-then statement:
Which command could have the effect to stop the form from being displayed and instead to display custom code ?
Any help is appreciated.
Then I could add an if-then statement:
if(time() >= strtotime($this->get("read_data3.title.enddate"))) { STOP COMMAND }Which command could have the effect to stop the form from being displayed and instead to display custom code ?
Any help is appreciated.
Use a PHP block with
return time() >= strtotime($this->get("read_data3.title.enddate"));Then a switch with data source set to {fn:your_php_block}{var:your_php_block}Then do something like thistrue:{event:show_form_unavailable_page}
false:{event:load_form}
For some reason I thought this was in Chronoconnectivity. Yes, do it with an event switcher.
Thanks for your answers.
Can you give me a hint how to do it with an Event Switcher. I haven't used it yet, so I don't fully understand its functionallity.
Thank you
Can you give me a hint how to do it with an Event Switcher. I haven't used it yet, so I don't fully understand its functionallity.
Thank you
Sure set your events to true, false. Display the form in false, display an error in true. Or the other way around whatever makes sense
Hi
I didn't succeed in figuring it out.
My thoughts:
I have a PHP block named "date-to-deactivate" I call the date from my DB (+3 days = 259200sec):

In event switcher I have

But no effect.
What did I miss?
I didn't succeed in figuring it out.
My thoughts:
I have a PHP block named "date-to-deactivate" I call the date from my DB (+3 days = 259200sec):

In event switcher I have

But no effect.
What did I miss?
Try "true, false"
{fn:} is something used in Chronoconnectivity, you should be using {var:}
Also you can simplify it a little with
Also you can simplify it a little with
return time >= strtotime($this->get("read_data3.title.enddate") . " + 3 days"));
Edited
This topic is locked and no more replies can be posted.
