<?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: Help with conditional routing</title>
		<link>https://legacy.forums.gravityhelp.com/topic/help-with-conditional-routing</link>
		<description>Gravity Support Forums Topic: Help with conditional routing</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 16:49:05 +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/help-with-conditional-routing" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Help with conditional routing"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-conditional-routing#post-38742</link>
			<pubDate>Mon, 24 Oct 2011 11:47:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38742@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Great.  Glad that worked out.  It was fun to create.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DysX631 on "Help with conditional routing"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-conditional-routing#post-38674</link>
			<pubDate>Sun, 23 Oct 2011 07:01:30 +0000</pubDate>
			<dc:creator>DysX631</dc:creator>
			<guid isPermaLink="false">38674@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris,&#60;/p&#62;
&#60;p&#62;Thanks so much for that, worked perfectly. Really appreciate it! :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Help with conditional routing"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-conditional-routing#post-38656</link>
			<pubDate>Sat, 22 Oct 2011 15:07:07 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38656@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It sounds like you want two notifications sent for each store, address 1 and address 2?  And you're using checkboxes, so there could be up to 60 notifications sent, 2 for each store, for each of 30 check boxes.&#60;/p&#62;
&#60;p&#62;Check out this code I wrote to see if it helps you:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/Nyyigyxb&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/Nyyigyxb&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Please post if you have questions implementing it.  This will add BCC email addresses to the admin notification.  The notification will still be set up in your form builder.  There will still be a &#34;To:&#34; notification sent, to the address you set up in the form builder.  There are a few things you will need to modify to make this work in your situation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DysX631 on "Help with conditional routing"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-conditional-routing#post-38603</link>
			<pubDate>Fri, 21 Oct 2011 16:57:18 +0000</pubDate>
			<dc:creator>DysX631</dc:creator>
			<guid isPermaLink="false">38603@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi guys,&#60;/p&#62;
&#60;p&#62;I asked about conditional routing before here; &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/conditional-routing&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/conditional-routing&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I've since purchased the form and basically I have a selection of checkboxes (over 30 in total) and I am trying to get this code to work with just 3 checkboxes for now.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_bcc&#38;quot;);
function add_bcc($form){

    //creating list of emails based on fields on the form
    $bcc  = $_POST[&#38;quot;input_31.1&#38;quot;] . &#38;quot;storea1@domain.com,storea2@domain.com&#38;quot;; //Store A
    $bcc .= $_POST[&#38;quot;input_31.9&#38;quot;] . &#38;quot;storeb1@domain.com,storeb2@domain.com&#38;quot;; //Store B
    $bcc .= $_POST[&#38;quot;input_31.15&#38;quot;] . &#38;quot;storea3@domain.com,storec1@domain.com&#38;quot;; //Store C

    //setting notification BCC field to the list of fields
    $form[&#38;quot;notification&#38;quot;][&#38;quot;bcc&#38;quot;] = $bcc;

    //returning modified form object
    return $form;

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So basically I want if some picks Store A &#38;amp; Store B from the checkboxes the notification goes to &#60;a href=&#34;mailto:storea1@domain.com&#34;&#62;storea1@domain.com&#60;/a&#62;, &#60;a href=&#34;mailto:storea2@domain.com&#34;&#62;storea2@domain.com&#60;/a&#62;, &#60;a href=&#34;mailto:storeb1@domain.com&#34;&#62;storeb1@domain.com&#60;/a&#62;, and &#60;a href=&#34;mailto:storeb2@domain.com&#34;&#62;storeb2@domain.com&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Alternatively if someone only picks Store A it'll go to &#60;a href=&#34;mailto:storea1@domain.com&#34;&#62;storea1@domain.com&#60;/a&#62; and &#60;a href=&#34;mailto:storea2@domain.com&#34;&#62;storea2@domain.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Right now it's going to all 6 email address regardless of selection plus the email specified in the admin area. Can you help please?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
