Solved

Dreamweaver Form Validation - Need to Validate Date Field

Posted on 2008-09-30
12
2,426 Views
Last Modified: 2010-04-21
Greetings experts,

Below is a Code Snippet of one of my fields on a form I am building in Dreamweaver. I found a SPRY feature(Dreamweaver Spry Form Widgets) in Dreamweaver that can validate fields. Never knew I can do this from Dreamweaver. Everything works great, and it is validating correctly to make sure it is a date field. However, what changes need to be made to the code below, to make it validate so that (it will not accept dates prior to 3 days or 72 hours into the future).

So for example, today is 09/30/2008, I want to validate so no dates prior to 10/03/2008 are accepatable. Is this possible, is it difficult, how can I make this happen.

Thanks to all of you in advance.

<td>

 <span id="sprytextfield1">

  <input name="JobDate" type="text" id="JobDate" size="40">

  <span class="textfieldRequiredMsg">A value is required.</span>

  <span class="textfieldInvalidFormatMsg">Invalid format.</span>

 </span>(mm/dd/yyyy)

</td>

Open in new window

0
Comment
Question by:pzozulka
  • 6
  • 4
  • 2
12 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22610183
Hi pzozulka,

The Spry text field validation does not do calculations, only format checks.  So there isn't an easy way to do this via Spry.

However, your requirements can be handled either by a server-side calculation or by using a non-Spry datepicker:

http://www.ajaxbestiary.com/2007/09/22/a-clean-and-simple-accessible-date-picker/
0
 
LVL 8

Author Comment

by:pzozulka
ID: 22610459
AJAX? I might be getting in over my head hear. I am a beginner in this area, and created this form using Dreamweaver. Not much coding involved. What steps would I need to take to implement this date-picker? It looks awesome, but difficult to implement.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22610476
Spry is an AJAX library too so you're not as over your head as you might think :)

If that page intimidated you, I suggest switching to a server-side validation.  How are you processing the form after submit?
0
 
LVL 4

Expert Comment

by:imgriff
ID: 22610655
Like jason1178 said, you won't be able to accomplish your goal with the spry dreamweaver gives you. You will have to do this with PHP (I assume PHP since you posted in the PHP section)

So here is what you do:
1. Allow the form to submit as long as the date field is a valid date
2. On your form processing PHP section use the function I'm providing
3. If the returned value is acceptable, we're good to go, if not, don't save form and send user back to form with an error message

Here is the link I got this function from
http://www.developertutorials.com/tutorials/php/calculating-difference-between-dates-php-051018/page1.html

I will also recommend implementing the date picker option offered by jason


//This function takes 2 dates and calculates the days between the 2

//In your case, you will do accept either a negative number or a positive number to tell you if the date chosen was a future or past date

//e.g. -10 days means the date chosen was matched against today and was smaller, therefor it's 10 days in the past

//a result of 10 means the date chosen is 10 days from today
 

function dateDiff($dformat, $endDate, $beginDate)//$begin date should be set to today

{

$date_parts1=explode($dformat, $beginDate);

$date_parts2=explode($dformat, $endDate);

$start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);

$end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);

return $end_date - $start_date;

}

Open in new window

0
 
LVL 4

Expert Comment

by:imgriff
ID: 22610663
I just looked at the page jason gave and I would go with that over my suggestion. It's a one in all solution.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22611219
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Author Comment

by:pzozulka
ID: 22615456
Here is what is processing the form after submit.
<?

// Post value declarations

$RqstType = $_POST["RqstType"];

$JobDate = $_POST["JobDate"];

$TimeZone = $_POST["TimeZone"];

$StartTime = $_POST["StartTime"];

$EndTime = $_POST["EndTime"];

$ScheduledDate = $_POST["ScheduledDate"];

$OrderedByFirstName = $_POST["OrderedByFirstName"];

$OrderedByLastName = $_POST["OrderedByLastName"];

$ContactFirstName = $_POST["ContactFirstName"];

$ContactLastName = $_POST["ContactLastName"];

$ContactMobile = $_POST["ContactMobile"];

$ContactPhone = $_POST["ContactPhone"];

$ContactFax = $_POST["ContactFax"];

$ContactEmail = $_POST["ContactEmail"];

$FirmName = $_POST["FirmName"];

$LocName = $_POST["LocName"];

$LocAddress = $_POST["LocAddress"];

$LocCity = $_POST["LocCity"];

$LocState = $_POST["LocState"];

$LocPostCode = $_POST["LocPostCode"];

$LocPhone = $_POST["LocPhone"];

$Witness1 = $_POST["Witness1"];

$Witness2 = $_POST["Witness2"];

$Witness3 = $_POST["Witness3"];

$ExpertType = $_POST["ExpertType"];

$CaseName = $_POST["CaseName"];

$CauseNo = $_POST["CauseNo"];

$Video = $_POST["Video"];

$Interpreter = $_POST["Interpreter"];

$GreenCopy = $_POST["GreenCopy"];

$Language = $_POST["Language"];

$RealTime = $_POST["RealTime"];

$Expedite = $_POST["Expedite"];

$TrialDate = $_POST["TrialDate"];

// To send HTML mail, the Content-type header must be set

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers

$headers .= 'From: support@domain.com <domain Support>' . "\r\n"; // This isn't working (ever) could be host anti-spam thing.

// $headers .= 'Cc:' . $EMail . "\r\n"; // Copy to ordering person (removed per request on 7/29/08)

$headers .= 'Bcc: pavelz@domain.com' . "\r\n"; // Copy to me as test
 

// Create repository order email
 

$to  = 'rinam@domain.com' . ', '; // note the comma
 

$to  .= 'elenab@domain.com' . ', ';
 

$to  .= 'saquibr@domain.com' . ', ';
 

$to  .= 'jennifers@domain.com';
 

$subject = "Schedule a Deposition";
 

$message= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
 

<html xmlns=\"http://www.w3.org/1999/xhtml\">
 

<head>
 

<title>Schedule a Deposition</title>
 

<style type=\"text/css\">font.n{ color:#ffffff; font-size:13px; font-family:arial, helvetica; text-decoration:none;}
 

font.a{ color:006699; font-size:15px; font-family:arial, helvetica;}
 

font.ax{ color:ffffff; font-size:12px; font-family:arial, helvetica; text-decoration: none;}
 

font.b{ color:#000000; font-size:14px; font-family:arial, helvetica; text-decoration:none;}
 

font.bx{ color:#000000; font-size:13px; font-family:arial, helvetica; text-decoration:none; background: white}
 

font.c{ color:#9999cc; font-size:21px; font-family:arial, helvetica;}
 

font.d{ color:#000000; font-size:16px; font-family:arial, helvetica;}
 

font.e{ color:#000000; font-size:12px; font-family:arial, helvetica;}
 

font.f{
 

        color: Red;
 

        font-size: 12px;
 

        font-family:arial, helvetica;
 

        text-decoration:none;
 

        font-style : italic;
 

}
 

BODY, DIV, TD, LAYER { font-size:8.5pt; font-family:arial; font-color:white;}
 

A:link { color:blue; text-decoration:none; }
 

A:visited { color:blue; text-decoration:none; }
 

A:hover, { color:red; text-decoration:none; }
 

A:active { color:red; text-decoration:none; }
 

.style2 {font-size: 14}
 

.style4 {font-family: Arial, Helvetica, sans-serif}
 

.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 14;}
 

.style6 {font-size: 10px}
 

.style7 {font-size: 12px}
 

.style8 {font-size: 14px}</style>
 

<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
 

</head>
 

<body>
 

<table width=\"550\" border=\"0\" cellpadding=\"5\" cellspacing=\"5\" bgcolor=\"#9999CC\">
 

  <tr>
 

    <td colspan=\"2\" scope=\"row\"><b>Depo Scheduled</b></td>
 

  </tr>
 

  <tr>
 

    <td align=\"left\" scope=\"row\" bgcolor=\"#9999CC\" width=\"25%\">Request Type: </td>
 

    <td width=\"75%\" bgcolor=\"#FFFFFF\">$RqstType</td>
 

  </tr>
 

  <tr>
 

    <td align=\"left\" scope=\"row\" bgcolor=\"#9999CC\">Job Date: <br /></td>
 

    <td bgcolor=\"#FFFFFF\">$JobDate</td>
 

  </tr>
 

  <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Time Zone: </td>
 

    <td bgcolor=\"#FFFFFF\">$TimeZone</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Start Time: </td>
 

    <td bgcolor=\"#FFFFFF\">$StartTime</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">End Time: </td>
 

    <td bgcolor=\"#FFFFFF\">$EndTime</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Date & Time Scheduled (Mountain Standard Time): </td>
 

    <td bgcolor=\"#FFFFFF\">$ScheduledDate</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Ordered By First Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$OrderedByFirstName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Ordered By Last Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$OrderedByLastName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Attorney First Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactFirstName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Attorney Last Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactLastName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Phone: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactPhone</td>
 

  </tr>
 

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Mobile: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactMobile</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Fax: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactFax</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Email: </td>
 

    <td bgcolor=\"#FFFFFF\">$ContactEmail</td>
 

  </tr>
 

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Firm Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$FirmName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Address: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocAddress</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location City: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocCity</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location State: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocState</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Zip: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocPostCode</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Phone: </td>
 

    <td bgcolor=\"#FFFFFF\">$LocPhone</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent1: </td>
 

    <td bgcolor=\"#FFFFFF\">$Witness1</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent2: </td>
 

    <td bgcolor=\"#FFFFFF\">$Witness2</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent3: </td>
 

    <td bgcolor=\"#FFFFFF\">$Witness3</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Expert Type: </td>
 

    <td bgcolor=\"#FFFFFF\">$ExpertType</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Case Name: </td>
 

    <td bgcolor=\"#FFFFFF\">$CaseName</td>
 

  </tr>

  

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Case Number: </td>
 

    <td bgcolor=\"#FFFFFF\">$CauseNo</td>

    

   </tr>

   

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Video: </td>
 

    <td bgcolor=\"#FFFFFF\">$Video</td>

    

      </tr>
 

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Interpreter: </td>
 

    <td bgcolor=\"#FFFFFF\">$Interpreter</td>

    

      </tr>

      

     <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Interpreter Language: </td>
 

    <td bgcolor=\"#FFFFFF\">$Language</td>
 

      </tr>

      

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">GreenCopy: </td>
 

    <td bgcolor=\"#FFFFFF\">$GreenCopy</td>
 

      </tr>

    

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">RealTime: </td>
 

    <td bgcolor=\"#FFFFFF\">$RealTime</td>

    

      </tr>
 

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Expedite: </td>
 

    <td bgcolor=\"#FFFFFF\">$Expedite</td>

    

      </tr>

    

    <tr>
 

    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Trial Date: </td>
 

    <td bgcolor=\"#FFFFFF\">$TrialDate</td>

    

      </tr>
 
 

</table>
 

</body>
 

</html>";
 
 
 

// Mail Repository order using values from above
 
 
 

mail($to, $subject, $message, $headers);
 
 
 

// Create confirmation page
 
 
 

echo"<html>
 

<head>
 

<title>Schedule a Deposition</title>
 

<style type=\"text/css\">
 

font.n{ color:#ffffff; font-size:13px; font-family:arial, helvetica; text-decoration:none;}
 

font.a{ color:006699; font-size:15px; font-family:arial, helvetica;}
 

font.ax{ color:ffffff; font-size:12px; font-family:arial, helvetica; text-decoration: none;}
 

font.b{ color:#000000; font-size:14px; font-family:arial, helvetica; text-decoration:none;}
 

font.bx{ color:#000000; font-size:13px; font-family:arial, helvetica; text-decoration:none; background: white}
 

font.c{ color:#9999cc; font-size:21px; font-family:arial, helvetica;}
 

font.d{ color:#000000; font-size:16px; font-family:arial, helvetica;}
 

font.e{ color:#000000; font-size:12px; font-family:arial, helvetica;}
 

font.f{
 

	color: Red;
 

	font-size: 12px;
 

	font-family:arial, helvetica;
 

	text-decoration:none;
 

	font-style : italic;
 

}
 

BODY, DIV, TD, LAYER { font-size:8.5pt; font-family:arial; font-color:white;}
 

A:link { color:blue; text-decoration:none; }
 

A:visited { color:blue; text-decoration:none; }
 

A:hover, { color:red; text-decoration:none; }
 

A:active { color:red; text-decoration:none; }
 

.style1 {
 

	font-size: 12pt;
 

	font-weight: bold;
 

}
 

</style>
 
 
 

<meta name=\"robots\" content=\"noindex\">
 

</head>
 

<body bgcolor=\"#ffffff\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
 
 
 

<table cellpadding=2 cellspacing=0 border=0 width=\"780\" bgcolor=\"#ffffff\">
 

<tr>
 

<td rowspan=6 bgcolor=\"#9999cc\" width=48 height=300><font class=c>&nbsp;</font></td>
 

<td rowspan=6 bgcolor=\"#ffffff\" width=10></td>
 

<td colspan=2 valign=middle>
 

<br>
 

<font class=c>Form Submitted</font><br>
 

</td>
 

<td width=\"304\">&nbsp;</td>
 

</tr>
 

<tr>
 

<td colspan=3 valign=top>
 

<hr noshade size=1 color=\"#cccccc\">
 
 
 

<hr noshade size=1 color=\"#cccccc\">
 
 
 

<table width=\"650\" border=\"0\" cellspacing=\"0\" cellpadding=\"15\" bgcolor=\"#EEEEEE\">
 

<tr>
 

  <td height=\"50\">

  <div><font class=\"b\" size=\"1\">Thank you for scheduling a deposition with domain Court Reporters! We will process your form shortly.

</font></div>

</td></tr>

</table>

</body>

</html>";

?>

Open in new window

0
 
LVL 8

Author Comment

by:pzozulka
ID: 22615832
Sorry if I am wording this incorrectly, I am a beginner in this area. I'm a systems admin, and usually don't work with websites. We needed an web form urgently and I had previous background with Dreamweaver. Don't know too much about coding though.

However, please correct me if I'm wrong. I downloaded the Date-Picker. I uploaded the entire extracted file (AJAX library) to the web server. Now I need to somehow point to it, and here is where the coding comes in right?

Now the Hard Part: How do I emplement it into my text field???
0
 
LVL 8

Author Comment

by:pzozulka
ID: 22615869
Sorry, just for reference, here is the actual code of the web form.
<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>

<TITLE>Contact Barkley Court Reporters</TITLE>

<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 

<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>

<SCRIPT language="JavaScript" type="text/JavaScript">

<!--

function MM_preloadImages() { //v3.0
 

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 

}

//-->

</SCRIPT>

<STYLE type="text/css">

<!--
 

.style4 {font-family: Arial, Helvetica, sans-serif}
 

a:link {

        color: #FFFFFF;

}

a:visited {

        color: #FFFFFF;

}

.style7 {color: #000000}

.style9 {

	color: #FFFFFF;

	font-family: Arial, Helvetica, sans-serif;

	font-size: 16px;

}

.style13 {font-size: 26px}

.style14 {

	color: #999999;

	font-size: 14;

	font-style: italic;

}

.style15 {font-size: 10px}

-->

</STYLE>
 

<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">

</HEAD>

<BODY bgcolor="3e5368" text="#FFFFFF">

        <table width="756" border="0">

  <tr>

    <td width="292"><img src="../images/logo.gif" width="149" height="56"></td>

    <td width="454"></td>

  </tr>

</table>
 

        <table width="955" height="844" border="0" cellpadding="10">

          <tr>

            <td width="183" valign="top"><p><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><a href="../">www.barkley.com</a></font></p>

                <table width="170" border="1" bordercolor="#DBD9CD" bgcolor="#DBD9CD">

                  <tr>

                    <td width="130" bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="client_home.html">Home</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="services.html">Services</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="support.html">Support</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="training.html">Training</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="contact.html">Contact</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="../repository">On-Site Repository</a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="http://www.barkleytt.com">Trial Technology </a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="https://web.barkley.com/attorney/">BarkleyWeb<font face="Symbol">&#0153;</font> </a></span> </td>

                  </tr>

                  <tr>

                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="http://www.webdocument.net/barkleyreporting">BarkleyE-Repository<font face="Symbol">&#0153;</font> </a></span></td>

                  </tr>

                </table>

              <p>&nbsp;</p></td>

            <td height="324" align="center">

            

            <p class="style9"><span class="style13">Schedule a Deposition</span></p>

            <p class="style9"><a href="../web/attorney.htm">Already have a BarkleyWeb&#8482; account?</a></p>

            <p class="style9">OR</p>

            <p class="style9">Fill out the form below:</p>

            <table width="820" height="976" border="0" align="center" background="../Images/sheduledepo1000.gif">

              <tr>

                <td width="820" height="972" align="left" valign="top"><table width="795" height="944" border="0">

                  <tr>

                    <td height="900" colspan="2" valign="top">

                    

                    <form action="scheduleform-process.php" method="post">

                      <p align="center">&nbsp;</p>

                      <table width="772" height="720" border="0" align="center">

                        <tr>

                          <td width="248"><span class="style9">Request Type:</span></td>

                          <td width="502"><span class="style9">

                        <select name="RqstType" size="1" class="style7" id="RqstType">

                              <option selected>New</option>

                              <option>Change</option>

                              <option>Cancellation</option>

                              <option>Confirmation</option>

                          </select>

                          </span></td>

                        </tr>

                        <tr>

                          <td class="style9">Deposition Date:</td>

                          <td><span id="sprytextfield1">

                          <input name="JobDate" type="text" class="style7" id="JobDate" size="40">

                          <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> (mm/dd/yyyy) </td>

                        </tr>

                        <tr>

                          <td class="style9">Time Zone:</td>

                          <td><span class="style9">

                            <select name="TimeZone" size="1" class="style7" id="TimeZone">

                              <option selected>Pacific Time (PST)</option>

                              <option>Mountain Time (MST)</option>

                              <option>Central Time (CST)</option>

                              <option>Eastern Time (EST)</option>

                            </select>

                          </span></td>

                        </tr>

                        <tr>

                          <td class="style9">Deposition Time:</td>

                          <td><span class="style9">

Start Time:

    <span id="sprytextfield7">

    <input name="StartTime" type="text" class="style7" id="StartTime" size="21">

    <span class="textfieldRequiredMsg"></span></span>

End Time:

<input name="EndTime" type="text" class="style7" id="EndTime" size="21">

                          </span></td>

                        </tr>

                        <tr>

                          <td class="style9">Ordered By:</td>

                          <td valign="middle" class="style9">First Name:

                            <span id="sprytextfield5">

                            <input name="OrderedByFirstName" type="text" class="style7" id="OrderedByFirstName">

                            <span class="textfieldRequiredMsg"></span>                            </span> 

                            Last Name: 

                            <span id="sprytextfield6">

                            <input name="OrderedByLastName" type="text" class="style7" id="OrderedByLastName">

                            <span class="textfieldRequiredMsg"></span></span></td>

                        </tr>

                        <tr>

                          <td class="style9">Attorney:</td>

                          <td valign="middle" class="style9">First Name:

                            <input name="ContactFirstName" type="text" class="style7" id="ContactFirstName"> 

                          Last Name: 

                          <input name="ContactLastName" type="text" class="style7" id="ContactLastName">                          </td>

                        </tr>

                        <tr>

                          <td class="style9">Phone: </td>

                          <td valign="middle"><input name="ContactPhone" type="text" class="style7" id="ContactPhone" size="66"></td>

                        </tr>

                        <tr>

                          <td class="style9">Mobile: <span class="style15">(Required for after-hour depositions)</span></td>

                          <td valign="middle"><input name="ContactMobile" type="text" class="style7" id="ContactMobile" size="66"></td>

                        </tr>

                        <tr>

                          <td class="style9">Fax Number: <span class="style15">(to send confirmation)</span></td>

                          <td valign="middle"><span id="sprytextfield8">

                          <input name="ContactFax" type="text" class="style7" id="ContactFax" size="66">

                          <span class="textfieldRequiredMsg"></span></span></td>

                        </tr>

                        <tr>

                          <td class="style9">E-mail: <span class="style15">(to send confirmation)</span></td>

                          <td valign="middle"><span id="sprytextfield2">

                          <input name="ContactEmail" type="text" class="style7" id="ContactEmail" size="50">

                          <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>

                        </tr>

                        <tr>

                          <td class="style9">Firm Name:</td>

                          <td valign="middle"><span id="sprytextfield9">

                            <input name="FirmName" type="text" class="style7" id="FirmName" size="66">

                          <span class="textfieldRequiredMsg"></span></span></td>

                        </tr>

                        <tr>

                          <td><span class="style9">Deposition Location:</span></td>

                          <td><table width="426" border="0">

                            <tr>

                              <td width="161"><span class="style9">Location Name: </span></td>

                              <td width="255"><span id="sprytextfield10">

                                <input name="LocName" type="text" class="style7" id="LocName" size="40">

                              <span class="textfieldRequiredMsg"></span></span></td>

                            </tr>

                            <tr>

                              <td><span class="style9">Address:</span></td>

                              <td><span class="style9">

                                <input name="LocAddress" type="text" class="style7" id="LocAddress" size="40">

                              </span></td>

                            </tr>

                            <tr>

                              <td><span class="style9">City:</span></td>

                              <td><span class="style9">

                                <input name="LocCity" type="text" class="style7" id="LocCity" size="40">

                              </span></td>

                            </tr>

                            <tr>

                              <td><span class="style9">State: </span></td>

                              <td><span class="style9">

                                <input name="LocState" type="text" class="style7" id="LocState" size="40">

                              </span></td>

                            </tr>

                            <tr>

                              <td class="style9">Zip:</td>

                              <td><input name="LocPostCode" type="text" class="style7" id="LocPostCode" size="40"></td>

                            </tr>

                            <tr>

                              <td class="style9">Phone:</td>

                              <td><input name="LocPhone" type="text" class="style7" id="LocPhone" size="40"></td>

                            </tr>

                          </table></td>

                        </tr>

                        <tr>

                          <td><span class="style9">Deponent 1:</span></td>

                          <td><span id="sprytextfield11">

                            <input name="Witness1" type="text" class="style7" id="Witness1" size="66">

                          <span class="textfieldRequiredMsg"></span></span></td>

                        </tr>

                        <tr>

                          <td><span class="style9">Deponent 2:</span></td>

                          <td><input name="Witness2" type="text" class="style7" id="Witness2" size="66"></td>

                        </tr>

                        <tr>

                          <td><span class="style9">Deponent 3:</span></td>

                          <td><input name="Witness3" type="text" class="style7" id="Witness3" size="66"></td>

                        </tr>

                        <tr>

                          <td class="style9">Expert Type:</td>

                          <td><span class="style9">

                            <select name="ExpertType" size="1" class="style7" id="ExpertType">

                              <option selected>Not an expert witness</option>

                              <option>Accident &amp; Injury</option>

                              <option>Business &amp; Financial</option>

                              <option>Civil Litigation</option>

                              <option>Construction &amp; Architecture</option>

                              <option>Criminal Litigation</option>

                              <option>Medical &amp; Psychological</option>

                              <option>Patent Infringement</option>

                              <option>Science &amp; Engineering</option>

                            </select>

                          </span></td>

                        </tr>

                        <tr>

                          <td><span class="style9">Case Name:</span></td>

                          <td><span id="sprytextfield12">

                            <input name="CaseName" type="text" class="style7" id="CaseName" size="66">

                          <span class="textfieldRequiredMsg"></span></span></td>

                        </tr>

                        <tr>

                          <td align="left"><span class="style9">Case #:</span></td>

                          <td><input name="CauseNo" type="text" class="style7" id="CauseNo" size="66"></td>

                        </tr>

                        <tr>

                          <td class="style9">Additional Services:</td>

                          <td><table width="426" border="0">

                            <tr>

                              <td class="style9"><input name="Video" type="checkbox" class="style9" id="Video" value="Video Checked"> 

                                Video 

                                <input name="Interpreter" type="checkbox" id="Interpreter" value="Interpreter Checked">

                                Interpreter<span class="style14">, 

                                <span id="sprytextfield4">

                                <input name="Language" type="text" class="style14" id="Language" size="25">

                              </span>                              </span></td>

                            </tr>

                            <tr>

                              <td class="style9"> <input name="GreenCopy" type="checkbox" id="GreenCopy" value="GreenCopy Checked">

                              GreenCopy&#8482; PDF* ($40 Discount)</td>

                            </tr>

                            <tr>

                              <td class="style9"><input name="RealTime" type="checkbox" class="style9" id="RealTime" value="Real-Time Checked"> 

                                Interactive Real-time</td>

                            </tr>

                            <tr>

                              <td class="style9"><input name="Expedite" type="checkbox" class="style9" id="Expedite" value="Expedite Checked">

                              Expedite/Trial Date<span id="sprytextfield3">

                              <input name="TrialDate" type="text" class="style14" id="TrialDate" size="26">

                              </span></td>

                            </tr>

                          </table></td>

                        </tr>

                        <tr>

                          <td height="56"><input name="ScheduledDate" type="hidden" id="ScheduledDate" value="<?php echo date("Y-m-j H:i:s");?>"></td>

                          <td><input name="submit" type="submit" class="style7" id="submit" value="Submit">

                          <input name="reset" type="reset" class="style7" id="reset" value="Reset"></td>

                        </tr>

                      </table>

                    </form>                    </td>

                  </tr>

                  <tr>

                    <td width="765" height="38" valign="top"><div align="center"><img src="../Images/sheduledepotree.gif" width="343" height="36" border="0" usemap="#Map"></div></td>

                    <td width="20" valign="top">&nbsp;</td>

                  </tr>

                </table>                

                  </td>

              </tr>

              </table>

            </td>

          </tr>

            </table>

          <P><FONT color="#FFFFFF" size="1" face="Arial, Helvetica, sans-serif">&copy; 2008 
 

  Barkley Court Reporters</FONT></P>
 
 

<map name="Map"><area shape="rect" coords="2,3,344,32" href="http://domain.com/PDF Files/domainEarthSmallPC08.pdf" target="_blank">

</map>

<script type="text/javascript">

<!--

var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy"});

var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email");

var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {isRequired:false, hint:"Trial Date"});

var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {isRequired:false, hint:"Language"});

var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none");

var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");

var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");

var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none");

var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");

var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10");

var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11");

var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12");

//-->

</script>

</BODY>
 

</HTML>

Open in new window

0
 
LVL 8

Author Comment

by:pzozulka
ID: 22629735
Any ideas?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 22629783
The problem here is that I don't have the time to break the code down and write in the validation checks.  You had asked how to do this with Spry and that was answered.  I suggest you post a new issue in the PHP and javascript Zones to asking for code samples to do the specific validation you need.
0
 
LVL 8

Author Closing Comment

by:pzozulka
ID: 31501772
Perfect, thank you.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now