I'm updating a form / plugin that I build as a silent auction tool and am encountering an issue as it relates to the end time for the form schedule. I have a custom validation tied to gform_validation for the form which successfully checks the bid values against custom post type custom field.
The issue occurs when I have the form displayed on screen before the end-time and submit the entry after the end-time has passed - the entry is still accepted. If I refresh browser immediately I do see the form give the unavailable message I have provided.
Is the scheduled form end time not evaluated as a part of the default validation?
Do I have to parse the form time fields as a part of my custom validation to ensure that submissions are actually provided before the intended time?
If that is the case - could you share code example of how to build up the form field time values shown below to properly compare to server?
echo "example: " . $form['scheduleEnd'] . " " . $form['scheduleEndHour'] . ":" . $form['scheduleEndMinute'];
It may relate to server time details as when I output
date('m/d/Y h:i a e O'); in PHP it shows me the server time is 10/06/2011 04:55 pm UTC +0000 and I have set the WordPress (Settings > General) TimeZone to match UTC +0. In my case, this results in having to put the end-time in form advanced settings as +4 of what I really want, but the custom message means I can keep that transparent from users so not horrible.
When I check the date_created field in wp_rg_lead for the entries I see them as 2011-10-06 16:21:05 which matches the UTC +0.