Hi,
I was just wondering if its possible to add javascript which fires on the OnDocFormRender event in a plugin, as just adding a <script> to the $e->output() results in the page breaking.
Thanks in advance
So basically, is there a way of creating your own ’Form Customisation’ rule, for example one that adds tagging to a template variable? I have already made the code for the tagging and other rules, but I can’t work out how to get it to fire when the page is loading...
I think you have to add it in the head tag if I’m reading you right here, Frontpage does this, assuming $head contains your script line :-
/* Place Frontpage head information in head, just before </head> tag */
$output = preg_replace('~(</head>)~i', $head . '\1', $output);
where $output would be $e->output() presumably.
Use MODx, or the cat gets it!