Sunday, May 30, 2010

Re: custom formhelper

Thank for the response.

I stil have a doubt about this way of proceding

dojo_form.php

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

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

}

In my case, I need to fork the whole FormHelper subtituting the Html
occurences with DojoHtml or there is a smarter way for it ?


euromark ha scritto:
> its
> App::Import('Helper', 'Html');
> etc
>
>
> On 30 Mai, 02:15, luca capra <luca.ca...@gmail.com> wrote:
>
>> 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 thishttp://cakeqs.org/eng/questions/view/custom_functions_arguments_in_fo...
>> and this (old) posthttp://cakebaker.42dh.com/2008/10/18/dont-abuse-the-apphelper-to-exte...
>> 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
>
>

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: