Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Custom fields questions

I know this has been covered in this thread and I have it 90% complete. The one thing I can't work out is seeing my new field in the ticket-edit.inc.php form. I can create the box's and the fields but it won't pull the data from the database.

I also want to add one of the new fields I have created as a new column in the scp tickets view.

Any help is greatly appreciated.

Comments

  • joesnow;39907 said:
    I know this has been covered in this thread and I have it 90% complete. The one thing I can't work out is seeing my new field in the ticket-edit.inc.php form. I can create the box's and the fields but it won't pull the data from the database.
    .
    Getting closer. I changed the type from string to text in the class.ticket.php

    }

    $id=0;
    $fields=array();
    $fields['name'] = array('type'=>'string', 'required'=>1, 'error'=>'Name required');
    $fields['email'] = array('type'=>'email', 'required'=>1, 'error'=>'Valid email required');
    $fields['subject'] = array('type'=>'string', 'required'=>1, 'error'=>'Subject required');
    $fields['message'] = array('type'=>'text', 'required'=>1, 'error'=>'Message required');
    $fields['company'] = array('type'=>'text', 'required'=>1, 'error'=>'Company required');
    $fields['onsite_contact'] = array('type'=>'text', 'required'=>1, 'error'=>'Contact onsite required');
    switch (strtolower($origin)) {
    case 'web':
    $fields['topicId'] = array('type'=>'int', 'required'=>1, 'error'=>'Select help topic');
    break;
    case 'staff':
    $fields['deptId'] = array('type'=>'int', 'required'=>1, 'error'=>'Dept. required');
    $fields['topicId'] = array('type'=>'int', 'required'=>1, 'error'=>'Topic required');
    $fields['duedate'] = array('type'=>'date', 'required'=>0, 'error'=>'Invalid date - must be MM/DD/YY');
    case 'api':
    $fields['source'] = array('type'=>'string', 'required'=>1, 'error'=>'Indicate source');
    break;
    case 'email':
    $fields['emailId'] = array('type'=>'int', 'required'=>1, 'error'=>'Email unknown');
    break;
    default:
    # TODO: Return error message
    $errors['err']=$errors['origin'] = 'Invalid origin given';
    }
Sign In or Register to comment.