Is it possible to generate a date based upon current date and location? My client currently has this bit of php in his html website to achieve this, we’re moving the site to WP and I’m looking to find a solution using gravity forms. Thanks for any help!!
Current code
// If the country is set to Ireland
if ($_POST[country] == "ireland") {
$booked_date = date("jS F Y", strtotime("14 weekdays"));
}
// If the country is not set to Ireland
else {
$booked_date = date("jS F Y", strtotime("10 weekdays"));
}
$date = strtotime($booked_date);
$date = date("l", $date);
$date = strtolower($date);
if($date == "saturday") {
$booked_date = date("jS F Y", strtotime($booked_date . ' + 2 day'));
}
if($date == "sunday") {
$booked_date = date("jS F Y", strtotime($booked_date . ' + 1 day'));
}