We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34926
    • 87 Posts
    Should this work? I can't seem to include a script in my plugin:

    switch($modx->event->name)
    {
    	case 'OnDocFormPrerender':
    		$modx->regClientStartupScript($modx->config['base_path'].'assets/components/mt/modext/widgets/element/mt.panel.template.js');
    		break;


    This is in MODx 2.2. I've tripple checked that the right system events are checked and it isn't a caching issue. Bit puzzled with this one... [ed. note: last edited this post 14 years, 6 months ago.]
      • 34926
      • 87 Posts
      OK it works with the OnDocFormRender system event. The documentation on this page (http://rtfm.modx.com/display/revolution20/Adding+Custom+Fields+to+Manager+Forms) states to use OnDocFormPrerender however.

      I will mark this as solved.