View Single Post
Old 20th August 2011, 16:53
nveid nveid is offline
Join Date: Jan 2006
Location: Daytona Beach, FL
Posts: 87
Thanks: 7
Thanked 17 Times in 14 Posts
Send a message via Yahoo to nveid Send a message via Skype™ to nveid

Another one before I goto sleep.. I'm working on the support module as well, trying to make it a little better.. How do I access the form data record when I'm doing a delete?

I'm trying something to this affect but its not working..

class support_delete extends tform_actions {
        function onDelete() {
                error_log("datarecord -> " . print_r($this->dataRecord,1)); 
                $user_id = $_SESSION['s']['user']['userid'];
                if($this->dataRecord['recipient_id'] != $user_id) {
                        // In this case just delete in the view table for this guy..
                        $sql = "INSERT INTO support_views (support_message_id, sys_userid, deleted) VALUES ( $this->id, $user_id, '1')";
                                error_log("Executed: ".$sql);
                } else {

$deletion = new support_delete;
-- RLB
Reply With Quote