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
Prefill nessage when creating new ticket
Moderator: mkoch227
Re: Prefill nessage when creating new ticket
Why not just link to the built-in feature?
https://www.hesk.com/knowledgebase/index.php?article=83
https://www.hesk.com/knowledgebase/index.php?article=83
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Prefill nessage when creating new ticket
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.
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?

//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?
I can work with that. I hope it does work even for longer (2000+ characters) prefills.

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?

//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?
Re: Prefill nessage when creating new ticket
Might be as simple as finding this in the index.php:
and adding this below:
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.
Code: Select all
if ( isset($_REQUEST['message']) )
{
$_SESSION['c_message'] = $_REQUEST['message'];
}
Code: Select all
elseif ( ! isset($_SESSION['c_message'])) {
$_SESSION['c_message'] = 'Your default message';
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Prefill nessage when creating new ticket
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.
Thank you again! HESK is awesome for family use.
