when I have a form with several checkboxes like that:
When trying to process it under Mason I stumble about really kludgy processing: If none or only one checkbox is checked, $ARGS{lookup} behaves like a scalar where the value is the value of the checkbox.<input type=checkbox name=lookup value="exact" checked> <% _('exact') +%><br> <input type=checkbox name=lookup value="partof"> <% _ +('part-of') %><br> <input type=checkbox name=lookup value="morph"> <% _( +'morphology') %><br> <input type=checkbox name=lookup value="fuzzy"> <% _( +'fuzzy') %><br> <input type=checkbox name=lookup value="regex"> <% _( +'regex') %>
BUT
If more than one checkboxes are checked, $ARGS{lookup} is a reference to an array. An ARRAY? Hell how should I know, which element index corresponds to what value? If I check exact and partof, $ARGS{lookup}[1] is "partof", but if I check exact and morphology, $ARGS{lookup}[1] is "morph".
There must be a better / working way to solve this!?
Bye
PetaMem All Perl: MT, NLP, NLU
In reply to Mason and (multiple) checkbox processing by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |