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
Post a Comment