For those who may find my end solution helpful, I have posted the code that I have actually used in my project.
I thought the reponses given to me were very informative and well thought out, and am very grateful for receving them. I ended up taking a couple of ideas, namely from
jeffa and
oknow, and from a follow-up chat with
tilly.
I let my friend do all the HTML design work on this one, and in the end we made a template of the form. As pointed out by
ChrisR, the checkboxes in the sample form were named the same, so she cleaned them up and we had a sample form that resembled this:
<tr align="center" bgcolor="#eeeeee">
<td bgcolor="#cccccc"><b>Monday</b> </td>
<td width="6%"><input type="checkbox" name="Monday" value="7a8a"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="8a9a"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="9a10a"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="10a11a"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="11a12p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="12p1p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="1p2p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="2p3p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="3p4p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="4p5p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="5p6p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="6p7p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="7p8p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="8p9p"
+/> </td>
<td width="6%"><input type="checkbox" name="Monday" value="9p10p"
+/> </td>
</tr>
Each day was passed to my Perl script as an array of checkboxes. Reading and parsing them as parameters was then as easy as:
# Extract and display a summary of information from the form.
my @days = qw(Monday Tuesday Wednesday Thursday Friday Saturday Su
+nday);
foreach my $day (@days)
{
my @times = $request->param($day);
# Count the number of days the user selected something
if(scalar @times) { $count += @times; }
# Pretty up time times
foreach(@times)
{
s/(\d{1,2}[ap])(\d{1,2}[ap])/\1-\2/;
s/(a|p)/\1m/g;
}
# Display the list for each day
$page .= "$day: " . (scalar @times == 0 ? "None" : "@times") .
+ $request->br();
}
# Show the total number of hours selected in the summary
$page .= $request->p() . "Total Hours Selected: $count" . $request
+->p();
Thanks again to those who took the time to comment on this.
MrCromeDome