There is Hope!
Hacked it to work so it can send to email addresses specified from the form itself.
I know it is not safe yet as it doesn’t sanitize or check input to prevent any user-submitted nastiness, but if you need it as a jumping off point here is what I did.
edit the file
core/components/formit/model/formit/fihooks.class.php where it says "
/* check email to */" as follows:
/* check email to */
// custom mod to get it to send email to value from a form field
$emailToField = $this->modx->getOption('emailToField',$this->formit->config,$emailToField);
if (!empty($emailToField)) {
$emailTo = $fields[$emailToField];
}
else {
$emailTo = $this->modx->getOption('emailTo',$this->formit->config,'');
}
then in your snippet call, add a parameter for
&emailToField and pass it the name of the form field you want to use for the To. (
ex: &emailToField =`addresses`)
Again, this has only be tested for one particular case but it worked for what I needed it to do. Since it is reassigning values to $emailTo before the validation is applied, the rules should still apply and since support is added for multiple To’s when comma separated, it should work for most cases.
I will submit to github as well and maybe someone can refine from there (tho slammed and never done it before, so may be a later in the week)
Hope it helps someone out. Thanks for a great base to work with (eForm used to drive me nuts)