I'm trying to make one registration form for two types of attendees that have different options for registration dates and price.
Here's how I'm trying to set it up:
They select their type:
<SELECT id=StudentType name=StudentType>
<OPTION id=0 selected value=0>Please Choose</OPTION>
<OPTION id=freshman value=F>Freshman</OPTION>
<OPTION id=transfer value=T>Transfer</OPTION>
</SELECT>
And then one of the following appears (using the jquery form plugin found at http://css-tricks.com/examples/SeminarRegTutorial/):
<SELECT id="freshmandate" name="">
<OPTION value="08/17-8:30"> Aug. 17 - 8:30</OPTION>
<OPTION value="08/17-9:45"> Aug. 17 - 9:45</OPTION>
<OPTION value="08/18-8:30"> Aug. 18 - 8:30</OPTION>
<OPTION value="08/18-9:45"> Aug. 18 - 9:45</OPTION>
</SELECT>
or
<SELECT id="transferdate" name="">
<OPTION value="08/17-8:30"> Aug. 17 - 8:30</OPTION>
<OPTION value="08/17-9:45"> Aug. 17 - 9:45</OPTION>
<OPTION value="08/18-8:30"> Aug. 18 - 8:30</OPTION>
<OPTION value="08/18-9:45"> Aug. 18 - 9:45</OPTION>
</SELECT>
Then the form processing, where I want to apply a different price value and date select name depending on which type the user chooses:
<SCRIPT language="Javascript">
function PaymentButtonClick( ) {
switch (document.info.StudentType.value) {
case 'F':
document.info.amount.value = 78.00;
document.info.freshmandate.name = altDate1;
break;
case 'T':
document.info.amount.value = 79.00;
document.info.transferdate.name = altDate1;
break;
}
ComCheck="";
VetCheck="";
NonTrad="";
if (document.info.CCheck.checked==true) ComCheck="C";
if (document.info.VCheck.checked==true) VetCheck="V";
if (document.info.NTCheck.checked==true) NonTrad="N";
document.addform.Product_Name.value=document.info.LastName.value+","+document.info.FirstName.value+","+document.info.StudentID.value+","+document.info.altDate1.value+","+document.info.Guests.value+ "," + document.info.StudentType.value+ComCheck+VetCheck+NonTrad;
document.addform.Product_Code.value = document.info.StudentID.value;
if (document.info.UCheck.checked==true)
{
if (document.info.altDate1.value != "-") {
if (document.info.LastName.value != "" && document.info.FirstName.value != "" && document.info.StudentID.value != "") {document.addform.submit();}
else { alert("Please enter missing information");}
}
}
}
</SCRIPT>
There are other form variables being passed to the shopping cart, but the date and price values are all I'm worried about.