Page 1 of 1

How to make name / email areas optional or hidden?

Posted: Thu Feb 07, 2019 3:03 pm
by heskneedhelp
Script URL: N/A
Version of script: 2.8.2 + MODS for HESK
Hosting company: https://www.lotosus.com
URL of phpinfo.php: N/A
URL of session_test.php: N/A
What terms did you try when SEARCHING for a solution: remove name, hide email areas

Write your message below:

Hi guys,

We are using ticket system for internal stuff only and wondering if it;s possible to somehow hide name / email areas when submitting ticket from admin panel? Just to save time, since we see one another tickets anyway

https://imgur.com/Rm7mvfE

As it's a must now and can't be removed or modified from the settings and / or custom fields.

The only thing I can think of is modifying system files (any idea which one?) and inserting default values to these areas + making them hidden but update would kill that tweak all the time.

Re: How to make name / email areas optional or hidden?

Posted: Sat Feb 09, 2019 7:38 pm
by Klemen
There is no built-in way of doing that in Hesk (not sure if it's in Mods for HESK, probably not?).

The file to be edited is admin/new_ticket.php

I could be as simple as changing

Code: Select all

// Customer name
if ( isset($_REQUEST['name']) )
{
	$_SESSION['as_name'] = $_REQUEST['name'];
}
else

// Customer email address
if ( isset($_REQUEST['email']) )
{
	$_SESSION['as_email']  = $_REQUEST['email'];
	$_SESSION['as_email2'] = $_REQUEST['email'];
}
to something like

Code: Select all

// Customer name
if ( isset($_REQUEST['name']) )
{
	$_SESSION['as_name'] = $_REQUEST['name'];
}
else
{
	$_SESSION['as_name'] = '[Customer]';
}

// Customer email address
if ( isset($_REQUEST['email']) )
{
	$_SESSION['as_email']  = $_REQUEST['email'];
	$_SESSION['as_email2'] = $_REQUEST['email'];
}
else
{
	$_SESSION['as_email'] = 'none@example.com';
	$_SESSION['as_email'] = 'none@example.com';
}
Note that the code is from original Hesk, not sure if Mods have any changes.