Page 1 of 1

Category Passive Mode?

Posted: Fri Mar 16, 2012 7:30 pm
by hollandsedrop
Opened with a direct link to the ticket category, the category field can be passive?

For example:
index.php?a=add&catid=1

Re: Category Passive Mode?

Posted: Fri Mar 16, 2012 7:50 pm
by Klemen
You mean not being able to change? You can try hiding category field like this:

In index.php find

Code: Select all

    if (hesk_dbNumRows($res) == 1)
    {
    	$row = hesk_dbFetchAssoc($res);
		echo '<input type="hidden" name="category" value="'.$row['id'].'" />';
    }
and just below this add

Code: Select all

    elseif (! empty($_GET['catid']) )
    {
    	$cid = intval($_GET['catid']) or $cid = 1;
        echo '<input type="hidden" name="category" value="'.$cid.'" />';
    }

Re: Category Passive Mode?

Posted: Sat Mar 17, 2012 9:45 pm
by hollandsedrop
Perfect!

Thanks Klemen.