Here is the html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Form : Carman Research</title> <link href="screen.css" type="text/css" rel="stylesheet" media="screen,projection" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.form.js"></script> <script type="text/javascript" src="jquery.batch.js"></script> <script type="text/javascript"> $(document).ready( function(){ // this jquery inplementation is based on techniques described by Tavis Davis at http://trevordavis.net $("#moreReferOther").hide(); $("input[name='referOther']").click(function() { //$("input[#formSex]").change(function(){ if ( $("input[name='referOther']:checked").val() == 'Other' ) { $("#moreReferOther").show('slow') ; } else { $("#moreReferOther").hide('slow'); } }); // unstable illness more $("#hideMedical").hide(); $("input[name='unstable']").click(function() { //$("input[#formSex]").change(function(){ if ( $("input[name='unstable']:checked").val() == 'yes' ) { $("#hideMedical").show('slow') ; } else { $("#hideMedical").hide('slow'); } }); // // cancer more $("#hideCancer").hide(); $("input[name='cancer']").click(function() { //$("input[#formSex]").change(function(){ if ( $("input[name='cancer']:checked").val() == 'yes' ) { $("#hideCancer").show('slow') ; } else { $("#hideCancer").hide('slow'); } }); $("#hideOtherCancer").hide(); $("input[name='otherCan']").click(function() { //$("input[#formSex]").change(function(){ if ( $("input[name='otherCan']:checked").val() == 'other' ) { $("#hideOtherCancer").show('slow') ; } else { $("#hideOtherCancer").hide('slow'); } }); // $("#formHideSex").hide(); $("input[name='sex']").click(function() { //$("input[#formSex]").change(function(){ if ( $("input[name='sex']:checked").val() == 'female' ) { $("#formHideSex").show('slow') ; } else { $("#formHideSex").hide('slow'); } }); $("#formSeizureHide").hide(); $("input[name='seizure']").click(function() { if ( $("input[name='seizure']:checked").val() == 'yes' ) { $("#formSeizureHide").show('slow') ; } else { $("#formSeizureHide").hide('slow'); } }); /* $("#formAllergyMedHide").hide(); $("input[name='allergyMed']").click(function() { if ( $("input[name='allergyMed']:checked").val() == 'yes' ) { $("#formAllergyMedHide").show('slow') ; } else { $("#formAllergyMedHide").hide('slow'); } }); */ // JQuery css Styling $("#errorBox").addClass("red"); $("#container").addClass("esubStyle"); $("#formAllergyMedHide").addClass("fhideBox"); $("#formSeizureHide").addClass("fhideBox"); $("#formHideSex").addClass("fhideBox"); $("#moreReferOther").addClass("fhideBox"); $("#hideMedical").addClass("fhideBox"); $("#hideCancer").addClass("fhideBox"); $("#hideOtherCancer").addClass("ffhideBox"); //set variables var referTVVal = ''; var referDirectVal = ''; var referPrintVal = ''; var referNewsVal = ''; var referWebVal = ''; var referOtherMoreVal = ''; /* $('#formHideSex').hide(); $("[EMAIL PROTECTED]'sex']").change(function(){ if ("[EMAIL PROTECTED]'sex']:checked").val() == 'female') { $("#formHideSex").show('slow'); } else { $("#formHideSex").hide('slow'); } } */ //$("[EMAIL PROTECTED]'makechoice']:checked").val() == 0 ? $ ("#HideMe").hide('slow') : $("#HideMe").show('slow'); // $("#submit").click(function(){ $(".error").hide(); //$("input[name='sex']").next().text("gender"); <--------- change the value of a text var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var problemVal = $("#problem").val(); var ageVal = $("#age").val(); //var sexVal = $("input[name='sex']:checked").val(); var sexVal = $("input[name='sex']:checked").val(); //var referVal = $("input[name='referral']:checked").val(); //var referVal = $("#referral").val() || []; //var referVal = $("input[name='referral']:checked").fieldValue(); var referTVVal = $("input[name='referTV']:checked").val(); var referDirectVal = $("input[name='referDirect']:checked").val(); var referPrintVal = $("input[name='referPrint']:checked").val(); var referNewsVal = $("input[name='referNews']:checked").val(); var referWebVal = $("input[name='referWeb']:checked").val(); var referOtherVal = $("input[name='referOther']:checked").val(); var referOtherMoreVal = $("#referOtherMore").val(); var moreMedicalVal = $("#moreMedical").val(); //cancer vars var cancerVal = $("input[name='cancer']:checked").val(); var cancerTypeVal = $("#cancerType").val(); var cancerDateVal = $("#cancerDate").val(); var chemoCanVal = $("input[name='chemoCan']:checked").val(); var radiationCanVal = $("input[name='radiationCan']:checked").val(); var surgeryCanVal = $("input[name='surgeryCan']:checked").val(); var otherCanVal = $("input[name='otherCan']:checked").val(); var otherCanMoreVal = $("#otherCanMore").val(); // var outpatientVal = $("input[name='outpatient']:checked").val(); var symptomsVal = $("#symptoms").val(); var durationVal = $("#duration").val(); var fertileVal = $("input[name='fertile']:checked").val(); var pregnantVal = $("input[name='pregnant']:checked").val(); var nursingVal = $("input[name='nursing']:checked").val(); var seizureVal = $("input[name='seizure']:checked").val(); var howmanyVal = $("#howmany").val(); var s_ageVal = $("#s_age").val(); var unstableVal = $("input[name='unstable']:checked").val(); var medsVal = $("#meds").val(); var antidepressantsVal = $("#antidepressants").val(); var allergyVal = $("input[name='allergy']:checked").val(); var allergyMedVal = $("input[name='allergyMed']:checked").val(); var addictionVal = $("input[name='addiction']:checked").val(); var alcoholdrugVal = $("#alcoholdrug").val(); // var allergyMedListVal = $("#allergyMedList").val(); var pnumVal = $("#pnum").val(); var messageVal = $("#message").val(); var queryString = $('#sendEmail').formSerialize(); // -------------> Variables that are verified with verify.php var fnameVal = $("#fname").val(); if(fnameVal == '') { $("#fnameBox").after('<span class="error">Please enter your first name.</span>'); hasError = true; } var lnameVal = $("#lname").val(); if(lnameVal == '') { $("#lnameBox").after('<span class="error">Please enter your last name name.</span>'); hasError = true; } var emailFromVal = $("#emailFrom").val(); if(emailFromVal == '') { $("#emailFromBox").after('<span class="error">Please enter your E- mail address.</span>'); hasError = true; } else if(!emailReg.test(emailFromVal)) { $("#emailFromBox").after('<span class="error">Please enter a valid E-mail address.</span>'); hasError = true; } if(hasError == false) { $(this).hide(); $("#sendEmail li.buttons").append('<img src="../images/ progressbar.gif" alt="Loading" id="loading" />'); $.post("sendemail.php", { emailFrom: emailFromVal, problem: problemVal, age: ageVal, sex: sexVal, referTV: referTVVal, referDirect: referDirectVal, referPrint: referPrintVal, referNews: referNewsVal, referWeb: referWebVal, referOther: referOtherVal, referOtherMore: referOtherMoreVal, outpatient: outpatientVal, symptoms: symptomsVal, duration: durationVal, fertile: fertileVal, pregnant: pregnantVal, nursing: nursingVal, seizure: seizureVal, howmany: howmanyVal, s_age: s_ageVal, cancer: cancerVal, unstable: unstableVal, meds: medsVal, antidepressants: antidepressantsVal, allergy: allergyVal, allergyMed: allergyMedVal, addiction: addictionVal, alcoholdrug: alcoholdrugVal, fname: fnameVal, lname: lnameVal, pnum: pnumVal, message: messageVal, sendEmail: queryString, moreMedical: moreMedicalVal, cancerType: cancerTypeVal, cancerDate: cancerDateVal, chemoCan: chemoCanVal, radiationCan: radiationCanVal, surgeryCan: surgeryCanVal, otherCanMore: otherCanMoreVal }, function(data){ $("#sendEmail").slideUp("normal", function() { $("#sendEmail").before('<h1>Success</h1><p>Your email was sent.</p>'); }); } ); } return false; }); }); </script> <link href="../styles.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #d3eeef; } --> </style></head> <body> <div id="container"> <?php include('verify.php'); ?> <form action="/beta/forms/" method="post" id="sendEmail"> <h1 class="b_header">Eligibility Submission</h1> <a id="top"></a> <p><label for="problem">For what diagnosis or problem are you seeking treatment?</label></p> <p><textarea name="problem" cols="45" id="problem"><?= $_POST['problem']; ?></textarea></p> <table width="375" border="0" cellpadding="0" cellspacing="0" class="formstyle"> <tr> <th width="151" scope="col"><p align="left">What is your age? <label for="age"></label> <input name="age" type="num" id="age" value="<?= $_POST['age']; ? >" size="2" /></p></th> <th width="224" scope="col"> <div id="formSex"> <p><label for="sex">male</label> <input name="sex" type="radio" id="sex" value="male"/> <label for="sex">female</label> <input name="sex" type="radio" id="sex" value="female"/></p> </div></th> </tr> </table> <div id="formHideSex" > <table width="399" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="205" align="left" class="formstyleb" scope="col">Are you fertile?</th> <th width="194" align="left" class="formstyleb" scope="col"><label for="fertile">yes</label> <input name="fertile" type="radio" id="fertile" value="yes"/ > <label for="fertile">no</label> <input name="fertile" type="radio" id="fertile" value="no"/ ></th> </tr> <tr> <td align="left" class="formstyleb">Are you pregnant?</ td> <td align="left" class="formstyleb"><label for="pregnant">yes</label> <input name="pregnant" type="radio" id="pregnant" value="yes"/> <label for="label">no</label> <input name="pregnant" type="radio" id="pregnant" value="no"/ ></td> </tr> <tr> <td align="left" class="formstyleb">Are you nursing?</ td> <td align="left" class="formstyleb"> <label for="nursing">yes </label> <input name="nursing" type="radio" id="nursing" value="yes"/> <label for="nursing">no</label> <input name="nursing" type="radio" id="nursing" value="no"/ ></td> </tr> </table> </div> <div formReferral> <p>How did you hear about Carman Research? (choose all that apply)</p> <table width="400" border="0" cellpadding="0" cellspacing="0" class="formstyle"> <tr> <th> <p align="left"> <input name="referTV" type="checkbox" value="TV" /> TV</p></th> <th> <p align="left"> <input name="referPrint" type="checkbox" value="Print" / > Print</p></th> <th> <p align="left"> <input name="referWeb" type="checkbox" value="Website" / > Website</p></th> </tr> <tr> <td> <p align="left"> <input name="referDirect" type="checkbox" value="Direct Mail" /> Direct Mail</p></td> <td> <p align="left"> <input name="referNews" type="checkbox" value="E- Newsletter" /> E-Newsletter</p></td> <td> <p align="left"> <input name="referOther" type="checkbox" value="Other" / > Other</p></td> </tr> </table> <div id="moreReferOther"> <p><label for="referOtherMore">Please Describe: </label> <input name="referOtherMore" type="text" id="referOtherMore" value="<?= $_POST['referOtherMore']; ?>" size="45" /> </p></div> </div> <div id="formOutpatient"> <p>Can you come for weekly outpatient visits at our Smyrna office <br /> for at least six (6) weeks?</p> <p><label for="outpatient">yes</label> <input name="outpatient" type="radio" id="outpatient" value="yes"/> <label for="sex">no</label> <input name="outpatient" type="radio" id="outpatient" value="no"/> </p> </div> <div id="formDuration"> <p><label for="duration">How long have you been feeling the way you feel today?</label></p> <p> <input name="duration" type="text" id="duration" value="<? = $_POST['duration']; ?>" size="45" /> </p> </div> <div id="formSymptoms"> <p><label for="problem">Please describe your symptoms (both physical and emotional). </label></p> <textarea name="symptoms" cols="45" id="symptoms"><?= $_POST['symptoms']; ?></textarea></p> </div> <div id="formSiezure"> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="245" scope="col" align="left"><p>Have you ever had a seizure?</th> <th width="155" scope="col" align="left"><p><label for="seizure">yes</label> <input name="seizure" type="radio" id="seizure" value="yes"/ ><label for="seizure">no</label> <input name="seizure" type="radio" id="seizure" value="no"/> </p></th> </tr> </table> <br /> </div> <div id="formSeizureHide"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="489" scope="col"><table width="155" border="0" cellspacing="0" cellpadding="0" align="left"> <tr align="left"> <th width="95" align="left" scope="col"><p>How many?</ p></th> <th width="60" align="left" scope="col"><p><input name="howmany" type="num" id="howmany" value="<?= $_POST['howmany']; ? >" size="3"/></p></th> </tr> </table><table width="240" border="0" cellspacing="0" cellpadding="0" align="left"> <tr> <th scope="col" align="left"><p>Age at time of last seizure?</p></th> <th scope="col" align="left"><p><input name="s_age" type="num" id="s_age" value="<?= $_POST['s_age']; ?>" size="3"/></p></ th> </tr> </table></th> <td width="1"></th> </tr> </table> <p> </p> </div> <div id="formUnstable"> <p>Do you have an unstable medical illness? <label for="unstable"> yes</label><input name="unstable" type="radio" id="unstable" value="yes"/> <label for="unstable">no</label><input name="unstable" type="radio" id="unstable" value="no"/> </p> <div id="hideMedical"> <p><label for="moreMedical">Please Describe: </label><textarea name="moreMedical" cols="45" id="moreMedical"><?= $_POST['moreMedical']; ?></textarea></p></div> </p> </div> <div id="formCancer"> <p>Have you ever had, or do you currently have a form of cancer? <label for="cancer">yes</label><input name="cancer" type="radio" id="cancer" value="yes"/> <label for="cancer">no</label><input name="cancer" type="radio" id="cancer" value="no"/> </p> <div id="hideCancer"> <p> <label for="cancerType">Type of cancer: </label> <input name="cancerType" type="text" id="cancerType" value="<? = $_POST['cancerType']; ?>" size="45" /> </p> <p> <label for="cancerDate">Date of last treatment: </label> <input name="cancerDate" type="text" id="cancerDate" value="<? = $_POST['cancerDate']; ?>" size="45" /> </p> <p>Type of treatment: </p> <table width="400" border="0" cellpadding="0" cellspacing="0" class="formstyle"> <tr> <th> <p align="left"> <input name="chemoCan" type="checkbox" value="chemo" /> Chemo</p></th> <th> <p align="left"> <input name="radiationCan" type="checkbox" value="radiation" /> Radiation</p></th> <th> <p align="left"> <input name="surgeryCan" type="checkbox" value="surgery" /> Surgery</p></th> <th> <p align="left"> <input name="otherCan" type="checkbox" value="other" /> Other</p></th> </tr> </table> <div id="hideOtherCancer"> <p><label for="otherCanMore">Please Describe: </label><textarea name="moreMedical" cols="45" id="otherCanMore"><?= $_POST['otherCanMore']; ?></textarea></p></div> </p> </div> </p> </div> <div id="formMeds"> <p>What medication(s) or herb(s) are you currently taking? <label for="meds"></label> <br /> <textarea name="meds" cols="45" id="meds"><?= $_POST['meds']; ?></textarea></p> </div> <div id="formAntidepressants"> <p>What antidepressants are you currently taking?</p><label for="antidepressants"></label> <textarea name="antidepressants" cols="45" id="antidepressants"><?= $_POST['antidepressants']; ?></textarea></p> </div> <div id="formAllergy"> <p>Do you have any Allergies?</p> <p> <label for="allergy">yes</label><input name="allergy" type="radio" id="allergy" value="yes"/> <label for="allergy">no</label><input name="allergy" type="radio" id="allergy" value="no"/> </p> </div> <div id="formAllergyMed"> <p>Are you allergic to any medicine(s) ?</p> <p> <label for="allergyMed">yes</label><input name="allergyMed" type="radio" id="allergyMed" value="yes"/> <label for="allergyMed">no</label><input name="allergyMed" type="radio" id="allergyMed" value="no"/> </p> </div> <div id="formAddiction"> <p>Have you ever been treated for drug dependency or alcoholism?</ p> <p> <label for="addiction">yes</label><input name="addiction" type="radio" id="addiction" value="yes"/> <label for="addiction">no</label><input name="addiction" type="radio" id="addiction" value="no"/> </p> </div> <div id="formAlcoholdrug"> <p><label for="alcoholdrug">When was your last use of alcohol or any street drug?</label></p> <p><textarea name="alcoholdrug" cols="45" id="alcoholdrug"><? = $_POST['alcoholdrug']; ?></textarea></p> </div> <p><span class="b_header">Contact Information </span><span class="alert">* fields are required</span> <div id="errorBox"> <div id="fnameBox"> <p><?php if(isset($fnameError)) echo '<span class="error">'. $fnameError.'</span>'; ?></p> </div> <div id="lnameBox"> <p><?php if(isset($lnameError)) echo '<span class="error">'. $lnameError.'</span>'; ?></p> </div> <div id="emailFromBox"> <p><?php if(isset($emailFromError)) echo '<span class="error">'.$emailFromError.'</span>'; ?></p> </div> </div> </p> <div ="idContact"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="202" align="left"><p><label for="fname">First Name:</ label> *</p> </th> <th width="298" align="left"><input type="text" name="fname" id="fname" value="<?= $_POST['fname']; ?>" /></th> </tr> <td><p> <label for="emailFrom">Last Name:</label> *</p></td> <td><input type="text" name="lname" id="lname" value="<?= $_POST['lname']; ?>" /></td> </tr> <tr> <td><p> <label for="pnum">Phone Number:</label></p></td> <td><input type="text" name="pnum" id="pnum" value="<?= $_POST['pnum']; ?>" /></td> </tr> <tr> <td><p> <label for="emailFrom">E-mail Address:</label> *</p></td> <td><p> <input type="text" name="emailFrom" id="emailFrom" value="<?= $_POST['emailFrom']; ?>" /></p></td> </tr> </table> <label for="emailFrom"></label> </div> <p><label for="message" class="b_header">Other Information you would like to share:</label></p> <p><textarea name="message" cols="45" rows="4" id="message"><?= $_POST['message']; ?></textarea></p> <?php if(isset($messageError)) echo '<span class="error">'. $messageError.'</span>'; ?> <div id="buttonField" class="buttons"> <button type="submit" id="submit">Submit Form»</ button> <p> <input type="hidden" name="submitted" id="submitted" value="true" /> <div> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </form> <div class="clearing"></div> </div> <?php include('../../includes/seo.php'); ?> </body> </html>