I'm trying to do this:
echo $this->Form->input("filter.wijk", array(
'onChange' => 'this.form.submit()',
'type' => 'select',
'multiple' => 'checkbox',
'options' => $wijkOpties,
'label' => false)
);
However, the onChange attribute does not appear in the resulting HTML. The documentation for FormHelper::input tells us this:
* ### Options
*
* See each field type method for more information. Any options that are part of
* $attributes or $options for the different **type** methods can be included in `$options` for input().i
* Additionally, any unknown keys that are not in the list below, or part of the selected type's options
* will be treated as a regular html attribute for the generated input.
Am I interpreting that last sentence in the wrong way?
'multiple' => 'checkbox',your code is just fine, it's simply that when the list is changed to multiple checkboxes list the onChange is not copied too ! Try'multiple' => true,and your code will work fine just as stated in the documentation.