We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29902
    • 72 Posts
    Is there a plugin for Revolution that let you Inherit First Child Template when you create a new document?
      ...I believed it was Friday...
      • 29902
      • 72 Posts
      I have now gotten this far:

      if ($modx->event->name = 'OnDocFormPrerender' && $mode == 'new') {

      $parent_id = $_REQUEST['parent'];
      $array_ids = $modx->getChildIds($parent_id, 1, array('context' => 'web'));

      if(!empty($array_ids)){
      $child_id = $array_ids['0'];
      $child = $modx->getObject('modResource', $child_id);
      $tpl = $child->template;
      }

      }

      Now I have to set the new documents template to $tpl. Anyone know how to do that?
        ...I believed it was Friday...
        • 29902
        • 72 Posts
        I found out that I could do the things I wanted with this plugin with Form Customization. Is that the correct way to do it?
          ...I believed it was Friday...