Page 1 of 1

Defaulting email for visitors

Posted: Thu Jun 25, 2009 6:52 pm
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.

Posted: Fri Jun 26, 2009 6:30 am
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.

Posted: Fri Jun 26, 2009 1:58 pm
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.

Posted: Fri Jun 26, 2009 2:02 pm
by Klemen
You deleted too much code, delete just exactly what is posted in my reply.