How to make name / email areas optional or hidden?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
heskneedhelp
Posts: 3
Joined: Mon Jul 31, 2017 9:12 am

How to make name / email areas optional or hidden?

Post 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.
Klemen
Site Admin
Posts: 10144
Joined: Fri Feb 11, 2005 4:04 pm

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

Post 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.
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