cakephp/cakephp — pull request #2891 by lorenzo (2014-02-23 22:35:53+00:00)
Title: 3.0 form input

Part of #2267. This makes `FormHelper::input()` work again. I removed a few options along the way:

* `before`, `between` and `after` placeholders are gone, you need to change the template to introduce those.
* Not possible to pass formatting options to the error container using array keys, you need to change the template instead.

Changed some of the magic type selection:

* If you manually specify the type, the helper will still attach the magic form attributes such as maxLength. This was not possible in 2.x
* Refactored the introspection functions, now they look cleaner and more focused.

Some problems that I found:

* The helper is making too many assumptions about the templates it uses, it basically is trying itself to the default templates. An example of this is that I had to `unset($options['type'])` in both `file` and `checkbox`, which are two of the fields that have a special template.
* Another example where the helper is too coupled to its default templates is that it is not possible, so far, to nest the input field inside the label. This is required for some bootstrap field types and is one of the options for inline forms in foundation.
* Specifying a table context was super difficult to figure out, I'd like to have a way of making it easier/clearer.