note
xtype
Actually,
<code>
print
$q->checkbox_group
(
-name=>'predefined',
-linebreak=>'true',
-values=>\@predefined,
-defaults=>param('predefined'),
);
</code>
does not appear to work. And instead fills the value and label of one checkbox with the arrayref. It returns something like:
<code>
<input type="checkbox" name="predefined" value="ARRAY(0x833ced0)" />ARRAY(0x833ced0)<br />
</code>
Where as:
<code>
print
$q->checkbox_group
(
-name=>'predefined',
-linebreak=>'true',
-values=>@predefined,
-defaults=>param('predefined'),
);
</code>
Works perfectly well. And acts exactly the same as changing $, did. (except xhtml-ish <b>br</b> tag).
<code>
<input type="checkbox" name="predefined" value="element content" />element content<br />
</code>
The perldoc appears to say one thing and do another.<br>
Even in its' own examples...<br>
"...the second argument should be an array reference." and yet:
<code>
print $query->checkbox_group(-name=>'group_name',
-values=>['eenie','meenie','minie','moe'],
-default=>['eenie','moe'],
-linebreak=>'true',
-labels=>\%labels);
</code>
The perldoc also gives this example:
<code>
@h = $query->checkbox_group(-name=>'group_name',-values=>\@values);
&use_in_creative_way(@h);
</code>
But this just fills @h with one element.
<code>
print $h[0];
---
<input type="checkbox" name="group_name" value="ARRAY(0x833d000)" />ARRAY(0x833d000)
</code>
Very odd indeed.
143541
143543