Page 1 of 1
Is it possible to integrate an "agent" field?
Posted: Tue Jul 26, 2005 1:28 pm
by llarndt#
Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Posted: Thu Jul 28, 2005 3:54 pm
by Klemen
Not without quite some editing. I will try to add custom fields in the next release, but I really have a hard time finding time to work on PHPJunkyard scripts ...
A lot of other work ... gotta make a living!
Regards
Re: Is it possible to integrate an "agent" field?
Posted: Thu Sep 22, 2005 8:04 pm
by logar
llarndt# wrote:Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Worse of case you might modify the source on your own, an easy way to add an agent field (just to get the info without putting it in the database) would be to add the following code around line 83-84 in index.php (after an existing
</tr> and before an existing
<tr>).
<tr>
<td align="right" width="150"><?php echo 'Agent'; ?>: <font class="important">*</font></td>
<td align="left" width="600"><input type="text" name="agent" size="20" maxlength="230</td>
</tr>
which would add the "agent" field you need to the form
then around line 40-45 in the file submit_ticket.php (after the following line
$name=hesk_input($_POST['name'],$hesklang['enter_your_name']);
add this line:
$agent= 'Agent:'.hesk_input($_POST['agent']);
Then search the following line:
INSERT INTO hesk_tickets (
trackid,company,name,email,category,priority,subject,message,dt,ip,status
and enter this line BEFORE the line you just searched:
$message = '<p><font size=2 color=006699"><b>'.$agent.'</b></font></p>'.$message;
and you'll have the agent noted in the message field (just a fast workaround I had to suggest you to customise hesk for your use... If you really need it to get in a separate field in the database, just tell me exactly how you need it and maybe i'll take a look at it :). Sorry I didn't post you full files sources (index.php and submit_ticket.php) but it wouldn't run if you have mysql (Converted mine to mssql and added custom fields/options). that is also why i cannot give you exact lines where to paste the code...
hope it may help you !
Maxime
Re: Is it possible to integrate an "agent" field?
Posted: Thu Sep 22, 2005 8:05 pm
by logar
llarndt# wrote:Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Worse of case you might modify the source on your own, an easy way to add an agent field (just to get the info without putting it in the database) would be to add the following code around line 83-84 in index.php (after an existing
</tr> and before an existing
<tr>).
<tr>
<td align="right" width="150"><?php echo 'Agent'; ?>: <font class="important">*</font></td>
<td align="left" width="600"><input type="text" name="agent" size="20" maxlength="230</td>
</tr>
which would add the "agent" field you need to the form
then around line 40-45 in the file submit_ticket.php (after the following line
$name=hesk_input($_POST['name'],$hesklang['enter_your_name']);
add this line:
$agent= 'Agent:'.hesk_input($_POST['agent']);
Then search the following line:
INSERT INTO hesk_tickets (
trackid,company,name,email,category,priority,subject,message,dt,ip,status
and enter this line BEFORE the line you just searched:
$message = '<p><font size=2 color=006699"><b>'.$agent.'</b></font></p>'.$message;
and you'll have the agent noted in the message field (just a fast workaround I had to suggest you to customise hesk for your use... If you really need it to get in a separate field in the database, just tell me exactly how you need it and maybe i'll take a look at it :). Sorry I didn't post you full files sources (index.php and submit_ticket.php) but it wouldn't run if you have mysql (Converted mine to mssql and added custom fields/options). that is also why i cannot give you exact lines where to paste the code...
hope it may help you !
Maxime
sorry for double post
Posted: Thu Sep 22, 2005 8:08 pm
by logar
Just wanted to say sorry for double posting.
Posted: Thu Sep 22, 2005 9:01 pm
by Klemen
Don't worry about it, your post is helpful

Re: Is it possible to integrate an "agent" field?
Posted: Mon Sep 26, 2005 8:58 am
by Gems
>If you really need it to get in a separate field in the database,
>just tell me exactly how you need it and maybe i'll take a look at it :).
Hi!
I have same problem.
I would like to add some fields (3 exactly) and I need to add this in the database.
Can I help me?
Thanks
Gems
P.S. Sorry for my bad english...
Re: Is it possible to integrate an "agent" field?
Posted: Mon Sep 26, 2005 8:48 pm
by Guest
Gems wrote:
I would like to add some fields (3 exactly) and I need to add this in the database.
I have resolved the problem myself
Thanks
Gems
How
Posted: Sun Feb 18, 2007 8:54 am
by nwbach
I'm also trying to add 3 form fields in the submission form.
-City
-State
-Dealer Number
If I use the info posted here and since it won't show in the database; where will this information post so I can see it?
(I'm really a newbie at this)
Your script works very well. And the install was smooth!
-M
Posted: Sun Feb 18, 2007 10:57 am
by Klemen
It would require way to much code editing to be able to help you here. You should wait for the next version of Hesk (which is currently in Beta testing) and will allow adding new fields simply from within the admin panel.
!
Posted: Mon Feb 19, 2007 12:53 am
by nwbach
Thanks for getting back to me so quickly. I can't wait for update.
Posted: Wed Feb 21, 2007 12:58 am
by l00ph0le
Logar, Great info that I intend on trying on my test copy of hesk..
It's funny many of us are requiring the same thing at this point. I want to thank Klemen Stirn for providing such a light and easy to use help desk.
I also look forward to seeing the next version of Hesk.
I too am looking to add a custom field to my submission form. I am looking to add a vehicle field( for fleet maintenance). I would like to be able to have the vehicle field inserted into the database, and Then I would like to add a search for by vehicles under the Show tickets field in the Admin panel.
Anyone that could help me with this let me know. I am looking to get this done asap.
By adding this one field, I can reduce the amount of categories I am going to use by almost 70%. Plus it will make it much easier for my users to be able to submit a ticket.
Sincerely
Adam
AKA L00ph0le
Ditto
Posted: Wed Feb 21, 2007 1:37 am
by nwbach
I too wish to thank Klemen. He has made an amazing well written script. I'm sure everyone is driving him crazy about the "custom fields". As he has stated, this is already in beta and they're working the bugs out. I know a little of PHP, just enough to know that creating the custom fields and having them write correctly to MySQL takes a pro at PHP. And Klemen is a pro at PHP.
Posted: Wed Feb 21, 2007 6:44 pm
by Klemen
Oh, you all are making me blush

Just for the record I'm not even close to being a PHP "pro", I'm just a guy who likes doing some useful and simple stuff
The Beta is currently in the hands of the testers and until I get some feedback and reports I can't release such a huge update (at least from the programming side).
!
Posted: Thu Feb 22, 2007 3:01 am
by nwbach
Plus, Klemen, you are a humble "pro". That's the best kind.
