Hide Category From Customer

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
DUMONTTF
Posts: 2
Joined: Sun Sep 09, 2012 3:47 pm

Hide Category From Customer

Post by DUMONTTF »

Hello,


I swear I browsed the forums looking for a reply before coming to you for help. I also acknowledge that you don't provide support for editing code in Hesk. Still, I thought I'd give it a shot and hope someone in the forums has a quick fix for this.


Here's the thing: I'd like to hide the category field from the customers when submitting a ticket and have it auto-assigned by the direct link to that category.


Can this be done?



Thanks in advance,
Tiago
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hide Category From Customer

Post by Klemen »

Something like this should work:

1. Open index.php in a text editor

2. find this code

Code: Select all

    if (hesk_dbNumRows($res) == 1)
    {
    	/* Only 1 public category, no need for select box */
    	$row = hesk_dbFetchAssoc($res);
		echo '<input type="hidden" name="category" value="'.$row['id'].'" />';
    }
3. just BELOW add this

Code: Select all

    elseif ( ! empty($_GET['catid']) )
    {
		echo '<input type="hidden" name="category" value="'.intval($_GET['catid']).'" />';
    }
4. Save, upload and test!
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
DUMONTTF
Posts: 2
Joined: Sun Sep 09, 2012 3:47 pm

Re: Hide Category From Customer

Post by DUMONTTF »

Absolutely perfect!

Thank you so much!
Post Reply