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
20,181 posts
Online Now

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.

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 personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
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
20,181 posts
Online Now

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.

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 personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

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.