thetuningspoon Posted February 28, 2014 Posted February 28, 2014 Is there a good way of removing a script that PW has attached to the $config->scripts array? I am using the admin functions to build a front end form and am struggling with replicating the image/file upload. I finally decided that the best solution at this point would be to just remove all js functionality from that field, but it is including the script automatically when the form is built.
teppo Posted March 1, 2014 Posted March 1, 2014 $config->scripts and $config->styles are FilenameArrays, so you can use following methods to remove content: $config->scripts->remove($filename); // remove one file $config->scripts->removeAll(); // remove everything 1
thetuningspoon Posted March 1, 2014 Author Posted March 1, 2014 Thanks teppo. I had tried remove() before but I was apparently doing it too early in the code.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now