Page 1 of 1

Pre Populating Email Fields

Posted: Mon Sep 03, 2007 10:47 am
by Duckz
Script URL: Internal
Version of script: 0.94
Hosting company: Internal
URL of phpinfo.php: Internal
URL of session_test.php: Internal
What terms did you try when SEARCHING for a solution: Pre Populating

Write your message below:

Hi There

Is it possible to pre-populate the email field so it has the same email address in for every ticket?

Many Thanks

Lee Meere

Posted: Mon Sep 03, 2007 11:37 am
by Klemen
If you know HTML just edit the form code in index.php

Posted: Mon Sep 03, 2007 2:41 pm
by rbbigdog
As Klemen mentioned, I think you just need to edit the index.php a little....You should be able to just replace the value input with an email address. That's the bold area below....just replace with a good email address (e.g. jsmith@yahoo.com)....make sure you keep the quotes around it.

<td align="left" width="600"><input type="text" name="email" size="30" maxlength="50" value="<?php echo stripslashes(hesk_input($_SESSION['c_email']));?>">

If you don't want the email address to be changed, than you might want to think about hiding this field too.....you just need to change the input type to "hidden".

If you want to show the user the email address that the form is going to (but they can't change it), than you could just add some text at the end like this:

<td align="left" width="600"><input type="hidden" name="email" size="30" maxlength="50" value="jsmith@yahoo.com">jsmith@yahoo.com</td>

Hope this helps a little,

RB

Posted: Mon Sep 03, 2007 3:21 pm
by Duckz
Many Thanks for this, I've now done this and hidden it.

Lee