2 Message fields in new_ticket

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Stephan1992
Posts: 25
Joined: Tue Oct 12, 2010 3:16 pm

2 Message fields in new_ticket

Post by Stephan1992 »

Script URL:
Version of script: 2.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
I've tried editing the code in new_ticket and Print.php, but it does not seem to work.

Write your message below:
(Sorry for not entering the above information, it's all internal so you would have no profit if I did give you the information. )

I would like to have 2 message fields when I create a new ticket. Ive tried editing new ticket.php to:

Code: Select all

<!-- ticket info -->
	<table border="0" width="100%">
	<tr>
	<td style="text-align:right" width="150"><?php echo $hesklang['subject']; ?>: <font class="important">*</font></td>
	<td width="80%"><input type="text" name="subject" size="40" maxlength="40" value="<?php if (isset($_SESSION['as_subject'])) {echo stripslashes(hesk_input($_SESSION['as_subject']));} ?>" /></td>
	</tr>
	<tr>
	<td style="text-align:right" width="150" valign="top"><?php echo $hesklang['message']; ?>: <font class="important">*</font></td>
	<td width="50%"><textarea name="message" rows="16" cols="60"><?php if (isset($_SESSION['as_message'])) {echo stripslashes(hesk_input($_SESSION['as_message']));} ?></textarea><br /><br />
	<td width="50%"><textarea name="message2" rows="16" cols="60"><?php if (isset($_SESSION['as_message2'])) {echo stripslashes(hesk_input($_SESSION['as_message2']));} ?></textarea><br /><br />
    </td>
	</tr>
	</table>
And print.php to:

Code: Select all

echo <<<EOC
<b>$hesklang[message]:</b><br />
$ticket[message] <br> 
$ticket[message2] <br>
Am I missing something?
I would like the fields to be displayed under eachother, and I want them to be displayed on print.php as well.
With the code I have edited, It displays 2 fields, side by side, but when i enter something in the second field, it doesn't show up in the admin_ticket.php page. Also, when I click printing preview, it doesn't show up.

Anybody?
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Re: 2 Message fields in new_ticket

Post by Klemen »

To make this work you will need to edit the database (add another MySQL table column for the second message) and the form processing and SQL code inside submit_ticket.php to insert the code into the database.
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
Stephan1992
Posts: 25
Joined: Tue Oct 12, 2010 3:16 pm

Re: 2 Message fields in new_ticket

Post by Stephan1992 »

Thank you Klemen,

I've dug in the scripts a little bit further and it all works just fine now.

Greets
Post Reply