Quantcast
Channel: Troubleshooting and Problems Discussions on osTicket Forums
Viewing all articles
Browse latest Browse all 568

Default Comments in Transfer

$
0
0
Hi, I'm trying to set default values to transfer a ticket.

If no comments, in the email the var is empty.
image
I found this code, but I can not set a default value.

function getFields() {

        if ($this->fields)
            return $this->fields;

        $fields = array(
            'dept' => new DepartmentField(array(
                    'id'=>1,
                    'label' => __('Department'),
                    'flags' => hexdec(0X450F3),
                    'required' => true,
                    'validator-error' => __('Department selection is required'),
                    )
                ),
            'comments' => new TextareaField(array(
                    'id' => 2,
                    'label'=> '',
                    'required'=>false,
                    'default'=>'',
                    'configuration' => array(
                        'html' => true,
                        'size' => 'small',
                        'placeholder' => __('Optional reason for the transfer'),
                        ),
                    )
                ),
            );

        $this->setFields($fields);

        return $this->fields;
    }

Is this possible?

Thanks!

Viewing all articles
Browse latest Browse all 568

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>