OK, well you need another label and field obviously and I see you've blocked space out for them in the HTML code already, so like:
Code:
<td align="justify" valign="top">
<p align="center">
<font color="#0000FF"><font face="Times New Roman"><label for="name"><b>
<font size="6">Name</font></b><font size="6"> *</font></label></font><font size="4">
</font>
</font>
<p align="center">
<input type="text" name="name" maxlength="50" size="40">
<p align="center"><label for="photocode"><b>
<font face="Times New Roman" style="font-size: 24pt; color: #0000FF">Code From Photo *</font></b></label></p>
<p align="center">
<input type="text" name="photocode" maxlength="50" size="40">
<p align="center"><font color="#0000FF"><font face="Times New Roman"><label for="email"><b><font size="6">Email Address</font></b><font size="6"> *</font></label></font><font size=4">
</font>
</font>
</p>
<p align="center">
<input type="hidden" name="subject" value="MY WEB SITE ENQUIRY"><input type="text" name="email" maxlength="100" size="40"></td>
will do. Note that the new field has the name 'photocode'.
Now all we have to do is to get the PHP file to recognize and use it. That's done in two places, three if you want it to be a required field. If you want it required, add it here:
Code:
// validation expected data exists
if(!isset($_POST['name']) ||
!isset($_POST['email']) ||
!isset($_POST['photocode']) ||
!isset($_POST['subject']) ||
!isset($_POST['comments'])) {
died('We are sorry, but there appears to be a problem with your request.');
}
Then regardless of whether it's required or not, add it here:
Code:
$name = $_POST['name']; // required
$email_from = $_POST['email']; // required
$photocode = $_POST['photocode'];
$site_url = $_POST['site_url']; // required
$site_title = $_POST['site_title'];
$comments = $_POST['comments']; // required
$email_subject = $_POST['subject']; // required
and here:
Code:
//----------------------------------------------------------------------------------------------
// I un-comment this code to places these fields in the email for debugging and valadation
//---------------------------------------------------------------------------------------------
//$email_message .= "captcha challenge: ".clean_string($recaptcha_challenge_field)."\n";
//$email_message .= "captcha responce: ".clean_string($recaptcha_response_field)."\n";
$email_message .= "Name: ".clean_string($name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Photo Code: ".clean_string($photocode)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";
That's it!
The browser cache may need to be cleared and/or the page refreshed to see changes.
Bookmarks