We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37971
    • 14 Posts
    As you know MODx play evil joke with some of us when do not allow use @, & and other chars in params in snippets calls. And that happened to me today and I want to ask you about your solutions in same situation.

    What we have. FormIt call:
    [[!FormIt?
    ...
        &hooks=`email,FormItSaveForm,redirect`
        &emailTo=`[email protected]`
    ...
    ]]


    and html form. Which disappear if MODx get '@' at emailTo param. After several hours of trying to get point of that I found only one solution. Obey.


    My "obey" solution:

    And this is new FormIt call (IMPORTANT! formItHook4Email before email):
    [[!FormIt?
    ...
        &hooks=`formItHook4Email,email,FormItSaveForm,redirect`
        &emailTo=`[[+destination]]`
    ...
    ]]


    and one new row for your form's html:
    <input type="hidden" name="destination" value="this value will be replaced with snippet formItHook4Email" />


    and new snippet with name formItHook4Email:
    <?php
    
    $hook->setValue ('destination', '[email protected]');
    
    return true;



    That's works for me. Hope save many hours for you! =)
      • 4172
      • 5,888 Posts
      Are you probably trying to put that snippet-call into a richtext-editor?
      Or why can't you use this special-chars directly on the snippet-call?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37971
        • 14 Posts
        Quote from: Bruno17 at Nov 13, 2015, 01:59 PM
        Are you probably trying to put that snippet-call into a richtext-editor?
        I've tried with Ace, with richtext, without anything. Same result. MODx have '@' sign...

        Quote from: Bruno17 at Nov 13, 2015, 01:59 PM
        Or why can't you use this special-chars directly on the snippet-call?
        What you mean?
          • 37971
          • 14 Posts
          Update: when use blank template and output just snippet and html form is shows... How locate a saboteur?..