Page 1 of 1
Autofill Portion of Ticket via Link
Posted: Sat Jan 04, 2014 7:55 pm
by mkoch227
I am currently working on a client's website, and I would like the users of the site to contact me via HESK if there are any issues with the site. To easily distinguish requests from the client site, I want to autofill the subject line when the user clicks a link to "contact the webmaster" (me). Is there any way I can modify the link so that a portion of the ticket is "pre-filled" for the user?
Re: Autofill Portion of Ticket via Link
Posted: Sun Jan 05, 2014 10:58 am
by Klemen
You could do that with a small modification:
1. send message using a query string, for example by adding "&subject=Test" to the URL
2. make HESK check if the subject parameter is set.
3. If yes, define a session variable with the subject
In other words:
1. open index.php
2. just BELOW this code
add something like
Code: Select all
if ( ! empty($_GET['subject']) )
{
$_SESSION['c_subject'] = stripslashes(hesk_input( hesk_GET('subject') ));
}
3. call your help desk like this:
Code: Select all
http://site.com/hesk/index.php?a=add&subject=Test
Re: Autofill Portion of Ticket via Link
Posted: Sat Jul 19, 2014 2:21 pm
by nklapper
The above is almost exactly what I need. However, what I need to do is auto-fill a few Custom Fields.
Could you please explain how to target these fields instead of "c_subject"?
Re: Autofill Portion of Ticket via Link
Posted: Sun Jul 20, 2014 7:38 am
by Klemen
You would use "c_custom1", "c_custom2",... up to "c_custom_20" instead.