php - How can I override cake FormHelper? -


i need change $form->create behaviour, created helper use instead of native formhelper:

slughelper:

app::import('helper', 'form'); class slugformhelper extends formhelper {      public function create() {         return "error";     } } 

in appcontroller:

public $helpers = array('slugform' => 'form'); 

and in view:

$form->create();  

but still calls native $form->create();

just thought - shouldn't define helpers in controller doing this:

public $helpers = array('slugform', 'form'); 

rather had "slugform => form". hope helps!


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -