i can't find anywhere how to set defaults on a checkboxlist.
the forms page only specifies other inputs including select, radio, checkbox.
setDefaultValue('val'); does not work with checkboxlist, and
I can't see any methods in the CheckboxList.php class or
thanks, but it doesn't work for me. I'm trying like this:
$form->setDefaults([$a_field => ["option-2"=>'1']]);
and get this error:
Uncaught exception 'Nette\InvalidArgumentException' with message 'Value '1' are out of allowed set ['option-1', 'option-2'] in field...
i think its generated by line 63: https://github.com/…eControl.php
but i can't yet follow the problem or see where ‘Value 1’ in that error is coming from
setDeafultValue doens't work with my array either…
all ideas welcome
Last edited by mikeb (2016-11-01 10:25)