Jump to content

How to automatically set the value of a field?


bytesource
 Share

Recommended Posts

Something that's in dev since 2.3.1 is that you can make the autoload specific. More infos can found here http://processwire.com/talk/topic/3768-processwire-231-dev-branch/3. Conditional autoload modules.

This is because if you look at your module, it will get loaded and hook added in init on EVERY request, even on front-end. So to make this easy you can use a selector or an anonymous function (php 5.3 only). 

To only load this module in the admin, you could then do 

"autoload" => "template=admin",
  • Like 4
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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