Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Converting large numbers of checkboxes to small number of params

by talexb (Chancellor)
on Jul 09, 2003 at 21:23 UTC ( #272830=note: print w/replies, xml ) Need Help??


in reply to Converting large numbers of checkboxes to small number of params

You've got the right idea -- use something like 1-7 for the days and 7-21 for the hours, then get Perl to generate field names of the form foo_(day)_(hour). This gives you unique checkbox names. Then when you get the form submitted, do a nested set of loops and see if each checkbox is selected or not. I'd probably pop that information straight into a database table.

Yeah, use a nested loop to output the checkboxes, and use the outter loop to handle the opening and closing tr, and the inner loop for the opening and closing td elements. Piece of cake.

--t. alex
Life is short: get busy!
  • Comment on Re: Converting large numbers of checkboxes to small number of params

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-12-06 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?