Prefill nessage when creating new ticket

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
Accustom
Posts: 5
Joined: Fri Jul 21, 2023 11:39 pm

Prefill nessage when creating new ticket

Post by Accustom »

Hi,

Which file do I have to edit if i want to prefill the "Message" Textbox for the user, when a new ticket is beeing created?

I guess it would be the index.php, but i struggle getting this "feature" into it.

regards
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Prefill nessage when creating new ticket

Post by Klemen »

Why not just link to the built-in feature?
https://www.hesk.com/knowledgebase/index.php?article=83
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
Accustom
Posts: 5
Joined: Fri Jul 21, 2023 11:39 pm

Re: Prefill nessage when creating new ticket

Post by Accustom »

Hi. Thank you for your help. I swear I did not find this article, even though I looked for it in the knowledgebase. I guess sometimes it is hard to find the right search-terms in a foreign language.

I can work with that. I hope it does work even for longer (2000+ characters) prefills. :P

Could you point me into the right direction in which file I can find the link for this button ("send ticket"), so i can edit it?

Image


//edit:
though, now that i think about it. It might be better to populate the text-field directly in the code instead of via link (GET, POST), because people might add the "index.php?a=add" as a bookmark. And when i change the prefill in the future, theirs won't be changed.
Would this be possible too?
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Prefill nessage when creating new ticket

Post by Klemen »

Might be as simple as finding this in the index.php:

Code: Select all

	if ( isset($_REQUEST['message']) )
	{
		$_SESSION['c_message'] = $_REQUEST['message'];
	}
and adding this below:

Code: Select all

    elseif ( ! isset($_SESSION['c_message'])) {
        $_SESSION['c_message'] = 'Your default message';
    }
Also, note that customizations are out of the scope of our support here; we do try to help with little things here and there, but please consult a PHP developer for help if you need further customizations.
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
Accustom
Posts: 5
Joined: Fri Jul 21, 2023 11:39 pm

Re: Prefill nessage when creating new ticket

Post by Accustom »

Thank you. I managed it on my own and wanted to post (nearly) the same solution, but the forum was down.

Thank you again! HESK is awesome for family use. :-)
Post Reply