<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Can custom_hooks.php use a variable for an email address?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Can custom_hooks.php use a variable for an email address?</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 23:07:27 +0000</pubDate>

<item>
<title>yuniar on "Can custom_hooks.php use a variable for an email address?"</title>
<link>https://www.machform.com/forums/topic/can-custom_hooksphp-use-a-variable-for-an-email-address#post-18402</link>
<pubDate>Tue, 28 May 2013 19:25:44 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">18402@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;cool :-)
&#60;/p&#62;</description>
</item>
<item>
<title>frankzobitz on "Can custom_hooks.php use a variable for an email address?"</title>
<link>https://www.machform.com/forums/topic/can-custom_hooksphp-use-a-variable-for-an-email-address#post-18389</link>
<pubDate>Sun, 26 May 2013 17:54:12 +0000</pubDate>
<dc:creator>frankzobitz</dc:creator>
<guid isPermaLink="false">18389@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I upgraded to 3.5 and it works perfectly now using the new conditional logic feature.  Thank you for a great piece of software!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Can custom_hooks.php use a variable for an email address?"</title>
<link>https://www.machform.com/forums/topic/can-custom_hooksphp-use-a-variable-for-an-email-address#post-18368</link>
<pubDate>Fri, 24 May 2013 18:54:28 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">18368@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I suggest to update to v3.5 and use the new conditional logic to send the email.&#60;br /&#62;
You can add an email field into your form and populate the value of this field by using URL parameters.&#60;/p&#62;
&#60;p&#62;Then set the conditional logic to send the email using that email field as the destination address.&#60;br /&#62;
Also, set the email field to be hidden by adding &#34;hidden&#34; keyword into the Custom CSS Class property of that field.
&#60;/p&#62;</description>
</item>
<item>
<title>frankzobitz on "Can custom_hooks.php use a variable for an email address?"</title>
<link>https://www.machform.com/forums/topic/can-custom_hooksphp-use-a-variable-for-an-email-address#post-18331</link>
<pubDate>Tue, 21 May 2013 00:08:32 +0000</pubDate>
<dc:creator>frankzobitz</dc:creator>
<guid isPermaLink="false">18331@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I have looked into this more and this is what I have discovered:&#60;/p&#62;
&#60;p&#62;If I put this directly into the custom-hooks file, it works as intended:&#60;/p&#62;
&#60;p&#62;global $mf_hook_emails;&#60;br /&#62;
$deptemail= 'customer_service@abc.com';&#60;br /&#62;
$mf_hook_emails[19734]['element_id'] = 7;&#60;br /&#62;
$mf_hook_emails[19734]['Dept Notify'] = $deptemail;&#60;/p&#62;
&#60;p&#62;However, in my case, $deptemail is assigned when the page is built and the variable isn't making it to the custom-hooks file.  I use the javascript code.&#60;/p&#62;
&#60;p&#62;Any help would be appreciated.
&#60;/p&#62;</description>
</item>
<item>
<title>frankzobitz on "Can custom_hooks.php use a variable for an email address?"</title>
<link>https://www.machform.com/forums/topic/can-custom_hooksphp-use-a-variable-for-an-email-address#post-18322</link>
<pubDate>Mon, 20 May 2013 13:10:46 +0000</pubDate>
<dc:creator>frankzobitz</dc:creator>
<guid isPermaLink="false">18322@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I would like to use one &#34;contact us&#34; form throughout an entire website and sub-sites.  Through the use of variables, I know what site or sub-site the user is at when they initiate the &#34;contact us&#34; action.&#60;/p&#62;
&#60;p&#62;I was able to get the custom_hooks (http://www.appnitro.com/doc-dynamic-email) working by hardcoding the email addresses in it.  However, I haven't been successful at passing it the email address through a variable.  I do not want the user to have to choose who to send it to.&#60;/p&#62;
&#60;p&#62;This is what I have:&#60;/p&#62;
&#60;p&#62;global $mf_hook_emails;&#60;br /&#62;
$mf_hook_emails[19734]['element_id'] = 7;&#60;br /&#62;
$mf_hook_emails[19734]['Dept Notify']   = $deptemail;&#60;/p&#62;
&#60;p&#62;If I remove $deptemail and put in 'customer_service@abc.com' it works.  If I echo the variable prior to the form being displayed on the page, the correct email address is displayed.  Any idea how I can get the variable working properly in the statement?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
