How to make a form begin and end on...

User 2202726 Photo


Registered User
12 posts

Is there a simple way to have a Web Form active only within a particular begin/end date span ? So that it is not accessible on the site either prior to or after those dates ?
User 187934 Photo


Senior Advisor
18,159 posts

If your not on S-Drive, use a php script to hide or show between the needed dates.
<?php
$now = new DateTime();
$startdate = new DateTime("2017-10-01");
$enddate = new DateTime("2017-10-31");

if($startdate <= $now && $now <= $enddate) {
echo "Yes";
}else{
echo "No";
}
?>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personnel site used for testing and as an easy way to share photos.(RLM imported to RSD)
http://ericrohloff.com
http://ericrohloff.com/property/
User 2202726 Photo


Registered User
12 posts

Thanks, Eric, I'll use that method for now. Perhaps a future build of WFB will include begin/end dates for forms. I see that option in other form building platforms.
User 187934 Photo


Senior Advisor
18,159 posts

Maybe I misunderstood. Are you working with the datepicker element or just hiding and showing form as I posted above?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personnel site used for testing and as an easy way to share photos.(RLM imported to RSD)
http://ericrohloff.com
http://ericrohloff.com/property/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.