Page 1 of 1

Possible to remove a 'submit ticket' field?

Posted: Thu Sep 04, 2008 1:17 pm
by MPH2008
Hi folks,

I am having difficulty working out if it is possible to remove one/two fields from the 'Submit Ticket' area of the script (without breaking the code).

The field I have been asked (by my manager) to remove is 'priority' and also, if it is possible, to remove the 'compulsory fields' for Email.

Can anyone help please? I'm more of a Java and XML person... so PHP is a bit beyond me presently. :D

Oh, and we would pay alot more for this script too, you could definitely ask for more than you currently are ;)

Posted: Thu Sep 04, 2008 6:02 pm
by Klemen
To remove priority simply delete this code

Code: Select all

<tr>
<td align="right" width="150"><?php echo $hesklang['priority']; ?>: <font class="important">*</font></td>
<td align="left" width="600"><select name="priority">
<option value="3" <?php if($_SESSION['c_priority']==3) {echo 'selected';} ?>><?php echo $hesklang['low']; ?></option>
<option value="2" <?php if($_SESSION['c_priority']==2) {echo 'selected';} ?>><?php echo $hesklang['medium']; ?></option>
<option value="1" <?php if($_SESSION['c_priority']==1) {echo 'selected';} ?>><?php echo $hesklang['high']; ?></option>
</select></td>
</tr>
from index.php and change this in submit_ticket.php

Code: Select all

$priority=hesk_input($_POST['priority']) or $hesk_error_buffer[]=$hesklang['sel_app_priority'];
to

Code: Select all

$priority = 3;
To make E-mail optional delete

Code: Select all

 or $hesk_error_buffer[]=$hesklang['enter_valid_email']
from submit_ticket.php. Make sure you DON'T delete the ending ; in the line!


I don't have any plans to make Hesk payable. Feel free to purchase a license though ( http://www.phpjunkyard.com/copyright-removal.php ) or donate a bit ( http://www.phpjunkyard.com/donations/donations.php ) :wink:

Posted: Fri Sep 05, 2008 8:47 am
by MPH2008
Thanks very much for your help - we have already bought a couple of licenses :D

Unfortunately, when I followed your instructions above I am presented with a HTTP 500 Internal Error when I click on 'Submit a support ticket' (../helpdesk/index.php?a=add), any ideas? :?

Posted: Fri Sep 05, 2008 1:41 pm
by MPH2008
Sorry for the double post - is it also possible to add more categories to 'categories' on the 'submit ticket' page also?

And... is it possible to remove the red '*' from the same page?

Posted: Sat Sep 06, 2008 8:06 am
by Klemen
The 500 error is probably doe to an error you made in the code. Double-check if you copied all the code exactly as above and make sure you don't delete the ending semi-colon ( ; ) after

Code: Select all

or $hesk_error_buffer[]=$hesklang['enter_valid_email']
If you can't find the problem post your index.php code here.

You can add categories simply from your admin panel, just click on the "Manage Categories" link in the top menu.

The code for red * is

Code: Select all

<font class="important">*</font>
, delete it in index.php next to the fields you don't have required.

Posted: Mon Sep 08, 2008 8:52 am
by MPH2008
Hi Klemen, thanks for your help.

The email function edits correctly and doesn't cause any errors - I believe the Priority is the error one...

Posted: Mon Sep 08, 2008 1:23 pm
by MPH2008
An update - I rechanged the code after re-dling the file and it works fine :)

Is there a way to disable emails being sent out? Currently my bosses (the admins for logging purposes) are getting spammed during the testing procedure.

Posted: Sat Sep 13, 2008 10:39 am
by Klemen
Login as his account and you can disable sending e-mails in "Profile".

Posted: Wed Sep 24, 2008 2:07 pm
by MPH2008
Sorry I didn't reply sooner - yes I figured out the email command after a bit of exploration. Thanks for the PHP scripts and your excellent support :)