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


In reply to Re: Converting large numbers of checkboxes to small number of params by MrCromeDome
in thread Converting large numbers of checkboxes to small number of params by MrCromeDome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.