Ticket customized message text based on category selected

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
ghoho
Posts: 2
Joined: Wed Feb 24, 2021 12:10 am

Ticket customized message text based on category selected

Post by ghoho »

Script URL: localhost test
Version of script: 3.1.2
Hosting company: local test
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: hesk template

Write your message below:

Dears,

Is it possible to pre-fill the message field (on index.php?a=add) automatically based on the category previously selected by the user ?
So for each category I want the message field pre-written with a customized text.

Edit: I tried template->ticket but it only seem to work on tickets created on the admin panel. I need something like this but on the client side.

Thank you all
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Ticket customized message text based on category selected

Post by Klemen »

Not based on category selection, but you can send the default message via a parameter:
https://www.hesk.com/knowledgebase/?article=83

Maybe create custom links on your website for categories and include a different message for each?
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
ghoho
Posts: 2
Joined: Wed Feb 24, 2021 12:10 am

Re: Ticket customized message text based on category selected

Post by ghoho »

Thank you Klemen

I just modified the category-select.php and added &message on the link with a switch condition based on the category ID.
Not ideal, but fixed my problem.

In case anyone needs this in the future, on "category-select.php" line 118 (after the foreach)

Code: Select all

<a href="index.php?a=add&amp;category=<?php echo $k; ?>&message=<?php switch($k):
                                case 1: echo 'TEXT 1';
                                        break;
                                case 2: echo 'TEXT 2';
                                        break;
                                case 3: echo 'TEXT 3';
                                        break;
                                default: echo ' ';
                                        break;
                                endswitch;?>
                            " class="navlink <?php if ($category_count > 8) echo "navlink-condensed"; ?>">
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Ticket customized message text based on category selected

Post by Klemen »

Great, thanks for sharing!
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
Post Reply