We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11927
    • 105 Posts
    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?
      You may or may not want to use the code I write. It&#39;s probably all against the syntax rules of php and MODx. smiley

      Carpet Cleaning
      • 11927
      • 105 Posts
      bump
        You may or may not want to use the code I write. It&#39;s probably all against the syntax rules of php and MODx. smiley

        Carpet Cleaning