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

make phone number required

hello

I am trying to force phone numbers to be a requirement

I changed the line

$fields['phone']    = array('type'=>'phone',    'required'=>0, 'error'=>'Valid phone # required');


to

$fields['phone']    = array('type'=>'phone',    'required'=>1, 'error'=>'Valid phone # required');


but I am still able to create a ticket with a blank phone number field


ideas?

Comments

  • anyone know how I can enforce this?

    Thanks
  • help ? :(
    please? :(
  • Solution

    Hello,

    you have to update the open.php file as well after this:
        if($thisclient) {
    $vars['name']=$thisclient->getName();
    $vars['email']=$thisclient->getEmail();


    Use the following after it, then it will give you an error if the class.ticket.php has the 'required' set to 1:

            $vars['phone']=$thisclient->getPhone();


    I know it's a late answer, but I just had the same problem and I solved it because of this thread ;)
  • There are also two functions in /include/class.ticket.php that have sections were

    $fields['phone']    = array('type'=>'phone',    'required'=>0, 'error'=>'Valid phone # required');


    is located. the update() and create() functions. Based on the original post there really is no way to tell if he put it in the right one. :)
Sign In or Register to comment.