We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36786 ☆ A M B ☆
    • 209 Posts
    Not without some killer PHP and JS skill I bet. [ed. note: maroonlover last edited this post 12 years, 6 months ago.]
      Ben Morrison
      Hacking templates to pieces since 2003
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Hmm. I think I'll go see if anybody else has suggested this, and put in a "feature" request for having a fields drop-down select in Form Customization so you can show/hide any of the resource fields besides the defaults. The processor will have to be modified as well to handle saving whatever fields are being used. That shouldn't be too difficult to do.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36786 ☆ A M B ☆
        • 209 Posts
        Can you help me construct a MySQL query to change all the children of parent 189 to modDocument at it's class_key?
          Ben Morrison
          Hacking templates to pieces since 2003
          • 4172
          • 5,888 Posts
          update modx_site_content set class_key="modDocument" where parent=189


          no warranty!
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 3749
            • 24,544 Posts
            This (in a snippet) will change all instances of Article to modDocument:


            $modx->updateCollection('modResource',
                     array('class_key' => 'modDocument'),
                     array('class_key' => 'Article')
            );



            This will do it just for the children of Resource 189:

            $children = $modx->getCollection('modResource', array('parent' => '189'));
            
            foreach($children as $child) {
               $child->set('class_key', 'modDocument');
               $child->save();
            }
            


              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
              • 36786 ☆ A M B ☆
              • 209 Posts
              Thanks everyone! I managed to completely switch to Grid Class Key from Articles smoothly and now my clients gets to use MoreGallery on any blog post they want. Considering how two of them are events coordinators, you can imagine how happy they are smiley

              I used this to easily modify the created_by field for resources (for those in the future who want to know):
              https://forums.modx.com/thread/?thread=90164&page=1
                Ben Morrison
                Hacking templates to pieces since 2003
                • 3749
                • 24,544 Posts
                I'm sure you know this, but just to unconfuse future readers of this thread, it's createdby, not created_by. wink
                  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