I’m trying to create a Hook that will change the &emailTo parameter, in the FormIt snippet call, if the user enters certain information.
So in the hook, I’ll check what the user entered and then if they enter a specific state, for example: Arizona, then the &emailTo will be changed to:
[email protected]. Instead of
[email protected].
(edit)
Use This (from
http://modxcms.com/forums/index.php/topic,66811.0.html):
<?php
$hook->formit->config['emailTo'] = $change_email;
I’ve tried (but maybe incorrectly):
<?php
//$hook->setValue('emailTo', $change_email);
//$modx->setOption('emailTo', $change_email);
The thing is, I don’t want the &emailTo to be a form field because then spider programs will harvest the emails from the site.
Any ideas?