[eluser]BrianDHall[/eluser]
[quote author="OverZealous" date="1256606629"][quote author="BrianDHall" date="1256595922"]
I would like to do some custom processing on save, with some magic features kind of like how created and updated fields work in DMZ. How might I extend DMZ to allow me such an ability, if possible?[/quote]
Form Validation is fine for this. What you would want to do is make a custom rule for IP like this:
Code:
function _insert_ip_on_new($field) {
if(empty($this->{$field})) {
$this->{$field} = ... // get IP address
}
}
Then add that rule to your IP column, first if you can. You can still process other rules after, if necessary (like unique).[/quote]
I had overlooked your response here, and I finally got it all working.
Just a hint for those unsure, but be sure to define 'required' AFTER you set your custom field on something like this, otherwise the rule won't run. And don't forget the _ in front of the function, or it might not run either
Thanks OverZealous, got back working on this again. Now to the next problem...