This is the same example that i have used to form my script.
But in stead of default=>['eenie','moe'] i use an array, wich should have the same effect.
But it doesn't!
Even if i write out a few values that are in the array in the way that it is done in the example it still doesn't work..
This code shows a group of checkboxes that are not checked. I can leave the defaults line out and it does exactly the same.
The values and the defaults have the same array, so i think it should check every box...
if its not working there has to be an error. OR.... your not populateing the array. put in a little forloop (right befor where your checkbox_group section is to print out the contents of your array ref.
do you have warnings turned on?
btw is this a typo on purpose?
'studenten_in_groep'
lastly use the code brackets and past your perl script.
The array i use for defaults is the same as the array for values. So i am sure that it is populated..
Warnings turned on, but nothing about this problem. The defaults option seems to be ignored completely. I can give it any value i want, either in a scalar or an array reference, it doesn't seem to do anything.
"studenten_in_groep" is just the name of the group.
In a previous answer you give me a piece of code to use;
checkbox_group(
-name=>'studenten_in_groep',
-values=>[@member_keys],
-defaults=>[@member_keys],
-labels=>\%temp_members,
-columns=>2),
You tell me i use references wrong, but in this code for an array reference you use [@member_keys]. That confused me, because it is not a reference!
I wasn't asking you how a reference to an array works, i was questioning your use of @member_keys in your code..
from cpan about checkbox_group:
Here they give an example of using the array ref the way i use it..
What makes you think this is homework??
studenten is dutch for students and groep is dutch for group, so it is not misspelling, it is just a different language than english!!