How can I validate this as one hidden field. I have 3 dropbdown list
month, day, year and I do not want to validate each separate on so I
would like to combine the strings together and validate the hidden
field. Pleas and thank you for your help.
<!-- DOB -->
<fieldset id="section-dob" class="group">
<legend><span>Birth date</span></legend>
<!-- Month -->
<div>
<label for="dob_month">Month</label>
<select name="month" value="" id="month"
onchange="document.getElementById('birthdate').value =
document.getElementById('month').value + '/'
+ document.getElementById('day').value + '/'
+ document.getElementById('year').value;
">
<option selected="selected" value="" >Month</option>
<?php
for($i=1;$i<=12;$i++) {
echo "<option>" . $i . "</option>";
}
?>
</select>
</div>
<!-- Day -->
<div>
<label for="dob_day">Day</label>
<select name="day" value="" id="day"
onchange="
document.getElementById('birthdate').value =
document.getElementById('month').value + '/'
+ document.getElementById('day').value + '/'
+ document.getElementById('year').value;
">
<option selected="selected" value="">Day</option>
<?php
for($i=1;$i<=31;$i++) {
echo "<option>" . $i . "</option>";
}
?>
</select>
</div>
<!-- Year -->
<div>
<label for="dob_year">Year</label>
<select name="year" value="" id="year"
onchange="
document.getElementById('birthdate').value =
document.getElementById('month').value + '/'
+ document.getElementById('day').value + '/'
+ document.getElementById('year').value;
">
<option selected="selected" value="">Year</option>
<?php
for($i=2005;$i<=2008;$i++) {
echo "<option>" . $i . "</option>";
}
?>
</select>