Hello Again,
I will copy and paste the code from all the sections that contain code. I really appreciate your help!
This is from the "Form HTML"
<?php
global $my,$mosConfig_live_site;
// first we check if the user is logged
// if so, then we fill out some fields and set them to read only
$readonl="";
$in="";
$out="";
if ($my->id) {
$out=" SELECTED";
$readonl=" readonly='readonly'";
} else {
$in=" SELECTED";
}
?>
<style type="text/css">
<!--
.style1 {font-size: large}
-->
</style>
<fieldset>
<span class="style1"><strong>Information Technology Department - Absentee Request Form</strong>
<label for="fromname"></label>
</span>
<label for="fromname"><br>
<br>
Name : </label>
<input type="text" name="fromname" id="fromname" tabindex="510" value="<?php echo $my->name?>"<?php echo $readonl?> /><br /><br />
<label for="fromemail">Email : </label><input type="text" name="fromemail" id="fromemail" tabindex="511" value="<?php echo $my->email?>"<?php echo $readonl?> /> <br /> <br />
<label for="inout">Reason : </label><select name="inout" id="inout" tabindex="512">
<option value="Personal"<?php echo $in ?>>Personal Day</option>
<option value="Sick">Sick Day</option>
<option value="Floating Holiday"<?php echo $out ?>>Floating Holiday</option>
<option value="Vacation"<?php echo $out ?>>Vacation Time</option>
<option value="Trade Show"<?php echo $out ?>>Trade Show</option>
<option value="Off Site Training"<?php echo $out ?>>Off Site Training</option>
<option value="Other"<?php echo $out ?>>Other</option>
</select> <br />
<br />
<table width="200" border="0">
<tr>
<td>Start Date:</td>
<td>End Date:</td>
</tr>
<tr>
<td><label for="futdate"></label>
<input type="text" name="futdate" id="futdate" tabindex="513" value="mm/dd/yyyy" /> </td>
<td><label for="label"></label>
<input type="text" name="futdate2" id="label" tabindex="513" value="mm/dd/yyyy" /></td>
</tr>
</table>
<i>Please type the dates in the field above</i><br />
<br>
Details :<br />
<label for="details"></label>
<textarea cols=40 rows=4 name="details" id="details" tabindex="514"></textarea><br />
</fieldset>
<fieldset>
<legend>Send</legend>
<?php if(!$my->id){ ?>
{imageverification}
<?php } ?>
<input type="submit" value="Send" tabindex="515" /> <input type="reset" value="Start over" tabindex="516" /></fieldset>
<script language="javascript">
document.ChronoContact_checkincheckout.fromname.focus();
</script>
This is from the "Form Javascript"
function checkform () {
if (document.ChronoContact_checkincheckout.fromname.value==""«»){
alert("Please typ your name"«»);
document.ChronoContact_checkincheckout.fromname.focus();
return false;
}
if (document.ChronoContact_checkincheckout.fromemail.value==""«»){
alert("Please typ your email"«»);
document.ChronoContact_checkincheckout.fromemail.focus();
return false;
}
return true;
}
This is from the "Element Titles"
fromname=Name
fromemail=Email address
This is from the "Auto Generated Tab":
<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_4 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".$_POST['fromname']."' , '".$_POST['fromemail']."' , '".$_POST['inout']."' , '".$_POST['futdate']."' , '".$_POST['futdate2']."' , '".$_POST['details']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
This is under the "Data View Fields Tab": Main String Ref: Record #n
Let me know if you need more. This is basically an edit of the sample form. Once again your help is greatly appreciated.