<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Form Submission End Date Validation / Server Time</title>
		<link>https://legacy.forums.gravityhelp.com/topic/form-submission-end-date-validation-server-time</link>
		<description>Gravity Support Forums Topic: Form Submission End Date Validation / Server Time</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 17:32:21 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/form-submission-end-date-validation-server-time" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Form Submission End Date Validation / Server Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/form-submission-end-date-validation-server-time#post-37244</link>
			<pubDate>Thu, 06 Oct 2011 16:31:13 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">37244@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Currently the form processing does not take into account the end date.  It's only used for the display of the form.  But we can certainly look at enhancing this so that it does do this check to ensure this scenario doesn't happen.  It won't make it in the 1.6 release but I'll see about getting this added in a subsequent 1.6.X release.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Idealien on "Form Submission End Date Validation / Server Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/form-submission-end-date-validation-server-time#post-37225</link>
			<pubDate>Thu, 06 Oct 2011 14:25:43 +0000</pubDate>
			<dc:creator>Idealien</dc:creator>
			<guid isPermaLink="false">37225@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think I've gotten a working solution:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$closeTime = strtotime($form[&#38;#39;scheduleEnd&#38;#39;] . &#38;quot; &#38;quot; . $form[&#38;#39;scheduleEndHour&#38;#39;] . &#38;quot;:&#38;quot; . $form[&#38;#39;scheduleEndMinute&#38;#39;] . &#38;quot; &#38;quot; . $form[&#38;#39;scheduleEndAmpm&#38;#39;]);
$currentTime = strtotime(date(&#38;#39;m/d/Y h:i a&#38;#39;));

if ($currentTime &#38;gt; $closeTime) {
	$validation_result[&#38;#39;is_valid&#38;#39;] = false;
	$form[&#38;quot;fields&#38;quot;][2][&#38;quot;failed_validation&#38;quot;] = true;
	$form[&#38;quot;fields&#38;quot;][2][&#38;quot;validation_message&#38;quot;] = $form[&#38;#39;scheduleMessage&#38;#39;];
	//$form[&#38;quot;fields&#38;quot;][2][&#38;quot;validation_message&#38;quot;] .= &#38;quot;&#38;lt;br/&#38;gt;Current: &#38;quot; . $currentTime . &#38;quot; / Close Time: &#38;quot; . $closeTime;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Might be something to consider adding as a configurable parameter so that longer forms can keep the 'if you get in the door to start, you have a chance to finish' approach compared to 'deadline = deadline no matter what.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Idealien on "Form Submission End Date Validation / Server Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/form-submission-end-date-validation-server-time#post-37222</link>
			<pubDate>Thu, 06 Oct 2011 13:09:23 +0000</pubDate>
			<dc:creator>Idealien</dc:creator>
			<guid isPermaLink="false">37222@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;Is the scheduled form end time not evaluated as a part of the default validation?&#60;br /&#62;
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?&#60;/p&#62;
&#60;p&#62;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?&#60;/p&#62;
&#60;p&#62;&#60;code&#62;echo &#38;quot;example: &#38;quot; . $form[&#38;#39;scheduleEnd&#38;#39;] . &#38;quot; &#38;quot; . $form[&#38;#39;scheduleEndHour&#38;#39;] . &#38;quot;:&#38;quot; . $form[&#38;#39;scheduleEndMinute&#38;#39;];&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;It may relate to server time details as when I output &#60;code&#62;date(&#38;#39;m/d/Y h:i a e O&#38;#39;);&#60;/code&#62; in PHP it shows me the server time is 10/06/2011 04:55 pm UTC +0000 and I have set the WordPress (Settings &#38;gt; 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.&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Jamie
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
