We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11093
    • 50 Posts
    Hi,
    I’was writing a module for a customer with an html form, i was tried to use eForm in order to check datas, and after 1 hour ( ^^ ) i saw this line in snippet code :
    if ($modx->isBackend()) {
    return ''; # don't go any further when inside manager
    }

    Is there really a problem, or could i comment this line and use it in manager ?

    Sorry for my poor english ^^
    Thanx
      • 27376
      • 576 Posts
      I ran in to the same problem, commented out that line, and it works great!

      One little snafu is: You can’t use action="[~[*id*]~]" in your chunks. I got around this by using the ’eFormOnBeforeFormParse’ event and made my own parser to detect such tags.

      preg_match_all('#\[\*(.*?)\*\]#', $tpl, $matches);

      preg_match_all Documentation

      Good luck!

      UPDATE: Using eForm in manager mode has some more quirks, You may run in to errors that, upon checking the System Event Log will see a bunch of "Use of undefined constant (x) - assumed ’(x)’, this is because the config array uses key indexes that aren’t in quotes, to get around this problem, just edit the snippet and put all the keys (snipPath, vericode, formid, etc) in the $params array in single quotes.