cakephp/cakephp — pull request #5099 by dakota (2014-11-06 12:40:27+00:00)
Title: 3.0 - Move checkbox hidden field outside of the label

Currently checkboxes are being rendered as

```html

A checkbox

```
which is not valid HTML as a label may only contain a single descendant input element.

This PR adds a special `_split` hiddenField option for checkboxes which will return an array from `checkbox` instead of a string. The array has two keys, 'hidden' and 'input'. `input()` will split up the input array and the label widget will treat the 'hidden' as a new template field. The 'nestingLabel' template has been updated with the `{{hidden}}` field.

The final result is the following:
```html

A checkbox

```