hm. Thank you. I'm playing around with this...
I created my own helper which uses the form helper, but simply modifies some options which I otherwise need to set in every form field. The modifications are simply divs around as I need it. http://bin.cakephp.org/view/1906937659 My problem: If I use my helper to create an edit form, the already stored values are not populated in the form. Only if I write <php $form->create("modelName"); ?> in front of it works. But that messes my code because it is populated tiwce (one with the hack, one with my helper). Anyone an idea whats the problem here? Regards, Alexander On 7 Jul., 15:50, Robert P <shiftyrobs...@gmail.com> wrote: > I refer you tohttp://book.cakephp.org/ > > http://book.cakephp.org/view/102/Including-other-Helpers > > On Jul 7, 9:48 pm, cronet <cro...@gmx.de> wrote: > > > Hi, > > > i want to use the FormHelper in my own helper. > > > simple helper example: > > > function formTest($model) { > > App::import('Helper', 'Html'); > > App::import('Helper', 'Form'); > > $form = new FormHelper(); > > echo $form->create($model); > > echo $form->inputs(); > > echo $form->end(); > > > } > > > It ends in the following error message: > > > Undefined property: FormHelper::$Html [CORE/cake/libs/view/helpers/ > > form.php, line 1033] > > Trying to get property of non-object [CORE/cake/libs/view/helpers/ > > form.php, line 1033] > > Undefined property: FormHelper::$Html [CORE/cake/libs/view/helpers/ > > form.php, line 248] > > Trying to get property of non-object [CORE/cake/libs/view/helpers/ > > form.php, line 248] > > > It seems that i can't use the form helper in my example. > > > Anyone tried this ? > > > Regards --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---