<?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: Email Based on Day</title>
		<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day</link>
		<description>Gravity Support Forums Topic: Email Based on Day</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 13:29:31 +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/email-based-on-day" rel="self" type="application/rss+xml" />

		<item>
			<title>transmyt on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19577</link>
			<pubDate>Mon, 28 Feb 2011 16:50:45 +0000</pubDate>
			<dc:creator>transmyt</dc:creator>
			<guid isPermaLink="false">19577@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Perfect! Thank you so, so much.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19574</link>
			<pubDate>Mon, 28 Feb 2011 16:39:38 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">19574@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Oops, missed that part about you using the manual date field. Here is some updated code: &#60;a href=&#34;http://pastie.org/1618206&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1618206&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Also, I forgot to mention that you'll want to update the &#34;41&#34; following the filter name to the ID of your form so this only fires for that form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>transmyt on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19569</link>
			<pubDate>Mon, 28 Feb 2011 16:26:20 +0000</pubDate>
			<dc:creator>transmyt</dc:creator>
			<guid isPermaLink="false">19569@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey David,&#60;/p&#62;
&#60;p&#62;Thanks so much, this is working almost perfectly. The emails are coming through just like they should but I'm getting the following error after submitting:&#60;/p&#62;
&#60;p&#62;----------------------------------------------------------------------------------------------------------------&#60;br /&#62;
Warning: strtotime() expects parameter 1 to be string, array given in /home/pbmaster/public_html/wp-content/themes/cure-lounge/functions.php on line 19.&#60;br /&#62;
----------------------------------------------------------------------------------------------------------------&#60;/p&#62;
&#60;p&#62;Anything I can do to resolve that?&#60;/p&#62;
&#60;p&#62;Thanks again, this is exactly what I was looking for.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19564</link>
			<pubDate>Mon, 28 Feb 2011 14:36:22 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">19564@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Transmyt,&#60;/p&#62;
&#60;p&#62;Give this a shot. Paste the following code in your theme's functions.php file: &#60;a href=&#34;http://pastie.org/1617746&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1617746&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Be sure to update the &#34;3&#34; on this line:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$date_field = 3;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;...to the ID of your date field.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>transmyt on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19556</link>
			<pubDate>Mon, 28 Feb 2011 13:26:46 +0000</pubDate>
			<dc:creator>transmyt</dc:creator>
			<guid isPermaLink="false">19556@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;By the way, this is how we were originally selecting the day:&#60;/p&#62;
&#60;p&#62;$eventday = strtolower( date( 'l', mktime( 0, 0, 0, $month, $day, $year ) ) );&#60;/p&#62;
&#60;p&#62;switch ( $eventday )&#60;br /&#62;
{&#60;br /&#62;
	case 'sunday': 		$mailto = 'sunday@curelounge.com'; break;&#60;br /&#62;
	case 'monday': 		$mailto = 'monday@curelounge.com'; break;&#60;br /&#62;
	case 'tuesday': 		$mailto = 'tuesday@curelounge.com'; break;&#60;br /&#62;
	case 'wednesday': 	$mailto = 'wednesday@curelounge.com'; break;&#60;br /&#62;
	case 'thursday': 	$mailto = 'thursday@curelounge.com'; break;&#60;br /&#62;
	case 'friday': 		$mailto = 'friday@curelounge.com'; break;&#60;br /&#62;
	case 'saturday': 	$mailto = 'saturday@curelounge.com'; break;&#60;br /&#62;
}
&#60;/p&#62;</description>
		</item>
		<item>
			<title>transmyt on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19555</link>
			<pubDate>Mon, 28 Feb 2011 13:23:31 +0000</pubDate>
			<dc:creator>transmyt</dc:creator>
			<guid isPermaLink="false">19555@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We could definitely do drop downs, but we still need to send the email based on the date selected. For example, if a person chose to reserve space on 02/28/2011, it'd send out to &#60;a href=&#34;mailto:monday@curelounge.com&#34;&#62;monday@curelounge.com&#60;/a&#62;. I'm pretty sure I remember reading that this isn't possible with the current routing capabilities...&#60;/p&#62;
&#60;p&#62;So, for gform_notification_email, I can call those three fields from the database and then add in the switch statement? Do you have an example of querying a field? If not, I'll try and get in touch with our developer to see if he has any insight but unfortunately this is just a wee-bit above my capabilities.&#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19549</link>
			<pubDate>Mon, 28 Feb 2011 12:59:56 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">19549@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Do you wan't to do this based on a Date field? Is it possible for you to use a Dropdown field for the dates instead? If so there is Routing functionality on the Admin Notification that lets you send to specific email addresses based on select fields (Drop down, radio button checkbox).&#60;/p&#62;
&#60;p&#62;If you have to use a Date field what you would use is the gform_notification_email hook to write custom code that sets the Admin Notification Send To email address. &#60;/p&#62;
&#60;p&#62;Here is an example of the gform_notification_email hook in use to set the Send To address:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_notification_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form){
   return &#38;quot;test@test.com&#38;quot;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You would want to do something similar, only you would get the value of the Date field and then use code to determine what day of the week it is and then do a switch on the day of the week to return the email address based on the day of the week.&#60;/p&#62;
&#60;p&#62;Let me know if you need additional information or if this is enough for you to go on.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>transmyt on "Email Based on Day"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/email-based-on-day#post-19533</link>
			<pubDate>Mon, 28 Feb 2011 12:13:58 +0000</pubDate>
			<dc:creator>transmyt</dc:creator>
			<guid isPermaLink="false">19533@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;First off, as many have said but deserves to be said again, thanks for the great plugin. You guys have built a fantastic product.&#60;/p&#62;
&#60;p&#62;Now, on to the question:&#60;/p&#62;
&#60;p&#62;We have a client - &#60;a href=&#34;http://curelounge.com&#34; rel=&#34;nofollow&#34;&#62;http://curelounge.com&#60;/a&#62;, a nightclub - who recently had their older forms converted to Gravity Forms minus one key element: based on a date selected, a specific person gets emailed.  &#60;/p&#62;
&#60;p&#62;So, originally, after a user chooses their reservation date, that date gets broken down to its day form and then, using switch logic, sends an email to &#60;a href=&#34;mailto:monday@curelounge.com&#34;&#62;monday@curelounge.com&#60;/a&#62;, &#60;a href=&#34;mailto:tuesday@curelounge.com&#34;&#62;tuesday@curelounge.com&#60;/a&#62; etc.&#60;/p&#62;
&#60;p&#62;I believe that all I need to do is use gform_post_submission to get the date fields (we're using the manual Date field, not the jQuery selector) and then put it through the same logic as before...but, unfortunately our developer is on vacation and I'm not sure what I need to call. &#60;/p&#62;
&#60;p&#62;As with any request in this field, the solution is due yesterday so any help would be much appreciated.&#60;/p&#62;
&#60;p&#62;Thanks so much!&#60;br /&#62;
Jeremy
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
