Custom FormHelper templatees

184 views Asked by At

The CakePHP docs on using the FormHelper suggest I should be able to create new templates for its output once, and use this throughout my project.

As described it requires modifying the loading of the FormHelper, from this:

$this->loadHelper('Form');

to this:

$this->loadHelper('Form', [
    'templates' => 'app_form',
]);

where app_form refers to a file in the config directory. However, I haven't had to actually load the FormHelper at all, it's magically available already, and if I try to do the above I get an error to the effect the helper has already been loaded:

The "Form" alias has already been loaded with the following config: array (...

Don't know if the docs are out of sync with the current version of CakePHP, but I can't see how to use this functionality - anyone know?

0

There are 0 answers