Saturday, May 29, 2010

custom formhelper

Hi all,

Using 1.3 stable I'm trying to override some function in a custom helper
overriding a core helper (form+html)
An example:

dojo_html.php

App::Import('Html');
class DojoHtmlHelper extends HtmlHelper {
var $tags = array(
'form' => '<form dojoType="dijit.form.Form" %s>',
'input' => '<span name="%s" %s></span>',
...
);
}

dojo_form.php

App::Import('Form');
class DojoFormHelper extends FormHelper {

var $helpers = array('Html'=>'DojoHtml','Js');

...some overridden functions...
}

but seems not to work.
I've found this
http://cakeqs.org/eng/questions/view/custom_functions_arguments_in_form_helper
and this (old) post
http://cakebaker.42dh.com/2008/10/18/dont-abuse-the-apphelper-to-extend-the-core-helpers/
but still can't get it...

my aim is to call $form->input with customized $tags from html helper
and get the dojo-related code.
Can somebody help me?

Thanks in advance,
Luca

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: