Created
June 8, 2018 18:07
-
-
Save matdave/3ea352c399b7fed488cc534cc32ed6a4 to your computer and use it in GitHub Desktop.
MODX FormIt Multi-Email Fix (for dynamic emails)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fields = $hook->getValues(); | |
$emailTo = $hook->formit->config['emailTo']; | |
if(strpos($emailTo,'[[+') !== false){ | |
$emailVar = str_replace('[[+','',$emailTo); | |
$emailVar = str_replace(']]','',$emailVar); | |
$hook->formit->config['emailTo'] = $fields[$emailVar]; | |
} | |
return true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment