Adding more custom fields?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
soopafly
Posts: 18
Joined: Mon May 22, 2006 9:20 pm

Adding more custom fields?

Post by soopafly »

Script URL: local
Version of script: .94
Hosting company:local
URL of phpinfo.php:local
URL of session_test.php:local
What terms did you try when SEARCHING for a solution: the search here

Write your message below:

Hello,
Adding custom fields to this release has been a godsend to myself and I'm sure others. I could imagine in the future needing even more than five custom fields. Is this possible with a few hacks?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can try adding a few more rows to the hesk_categories table with names "custom6", "custom7", etc. Then you need to change the "5" in

Code: Select all

($i=1;$i<=5;$i++)
to for example "7":

Code: Select all

($i=1;$i<=7;$i++)
This code is found once in admin_settings.php and twice in admin_settings_save.php, need to edit all three of them.

Besides that I think all the code is written to allow more fields, but can't guarantee it, you will need to try yourself.

And make sure you BACKUP your database and files before editing them.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
soopafly
Posts: 18
Joined: Mon May 22, 2006 9:20 pm

Post by soopafly »

Very very close! The extra custom fields are there in the form, but it's not writing to the database

I've also added this line to admin_settings_save.php

Code: Select all

        'custom6'  => array('use'=>0,'req'=>0,'name'=>'Custom field 6','maxlen'=>255)
soopafly
Posts: 18
Joined: Mon May 22, 2006 9:20 pm

Post by soopafly »

Ah!! I figured it out. In submit_ticket.php, I've added "custom 6" to these lines

Code: Select all

`trackid`,`name`,`email`,`category`,`priority`,`subject`,`message`,`dt`,`lastchange`,`ip`,`status`,`attachments`,`custom1`,`custom2`,`custom3`,`custom4`,`custom5`,`custom6`
Post Reply