everyone.
I have to change the template of the FormHelper. Not for just 1 or 2 view, for ALL views. And i would like to do this without to have to write hundred of line in every view.
Is it possible to change the FormHelper default template ? Where the default template is located ?
CakePHP documentation don't say anythings in order to change template of Whole Site, for FormHelper or Paginator, that's a real problem.
I'm not with CakePHP 3 but only CakePHP 2.6
If I understand correctly, you want to modify or use their own "bake" template, in order to avoid repetition of writing html and php code.
Here is what documentation say: http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html#modify-default-html-produced-by-baked-templates
If you want to modify cake helper, copy from
\cakephp\lib\Cake\View\Helper
in the \cakephp\app\View\Helper
and then make modification.
Here is documentations for creating own helpers http://book.cakephp.org/2.0/en/views/helpers.html#creating-helpers
Well...the file you are looking for is located in
/lib/Cake/View/Helper/FormHelper.php
You should search for example for:
function input(
or
function create(
that is the "template" you are looking for. I think the easiest way to change the output is to update your $options array. There you can add classes or labels or whatever.