Jump to content

Recommended Posts

Posted

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.

Posted

$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
  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...