We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Quote from: splittingred at Feb 26, 2010, 01:25 PM

    Yes and yes. Thanks Bob.

    Done.

    Man, I don’t know which I hate more, Wiki markup or the Wiki markup editor. 5 minutes to make the changes, 20 to fix the format problems created by the editor. It kept escaping the | marks in the note above every time I previewed (without ever using the RTE).

    BTW, the $modx object seems to be available directly in a custom hook snippet without resorting to $scriptProperties[hook]->modx. Is there a reason to use the long form?

      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 28215
      • 4,149 Posts
      Quote from: BobRay at Feb 26, 2010, 02:12 PM

      BTW, the $modx object seems to be available directly in a custom hook snippet without resorting to $scriptProperties[hook]->modx. Is there a reason to use the long form?
      None, really. The hook property is there if you want to access the fiHooks class for some reason (and consequently, the FormIt class via $scriptProperties[’hook’]->formit).
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        Hmmm . . . When I try returning an array of error messages from a custom hook, Formit just goes on to the next hook (redirect in this case):

         return array(  
            'email' => 'Invalid email address!',  
            'subject' => 'Forbidden word in subject',  
         ); 
        
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting