Defaulting email for visitors

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Amphicar770
Posts: 15
Joined: Fri Jun 05, 2009 9:33 pm

Defaulting email for visitors

Post by Amphicar770 »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi again.

Once again, great software. In the next few minutes I will be purchasing a 2nd copy. Can't wait till new version.

Anyway, for the 2nd instance I will be using it more as an internal service desk tool to track tickets.

What I would like to do when a ticket is created is to prepopulate the email field with something like generic_user@mydomain.com and make it non-editable (it could thus even be completely invisible). I would still want to capture the "name" field but what I am essentially doing is sending all notifications that would normally go to the visitor to a dummy mailbox.

Thanks.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Open index.php file in a plain text editor (Notepad) and:

1. delete this code:

Code: Select all

	<tr>
	<td style="text-align:right" width="150"><?php echo $hesklang['email']; ?>: <font class="important">*</font></td>
	<td width="80%"><input type="text" name="email" size="40" maxlength="50" value="<?php echo stripslashes(hesk_input($_SESSION['c_email']));?>" /></td>
	</tr>


2. change

Code: Select all

<input type="hidden" name="kb" id="kb" value="N" />
to

Code: Select all

<input type="hidden" name="kb" id="kb" value="N" />
<input type="hidden" name="email" value="generic_user@mydomain.com" />
That should do the trick.
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
Amphicar770
Posts: 15
Joined: Fri Jun 05, 2009 9:33 pm

Post by Amphicar770 »

Thanks again for the great support.

This seems to work although it eliminates both the name and email field. I would like to keep the users Name field as required, just hide the email.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You deleted too much code, delete just exactly what is posted in my reply.
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