Mark,
thanks for the reply. I am inclined to agree with you. I was just
experimenting with the CakePHP helpers to see what was available. I
was just very surprised at how that failed.

Thanks
Steve


On Jan 12, 4:21 pm, euromark <dereurom...@googlemail.com> wrote:
> actually i dont like that approach
> but i guess thats everybody's own opinion
>
> not without reason even the very famous flash() function now
> finally returns the values in cake1.3 instead of echoing it
> same with the debug sql table
>
> there might still be some cases where you have to chain the strings
> and return them to somewhere else
> this way you put a spoke in your wheel
>
> so better returning everything and echoing it extactly where you want
> to have it.
> there is no overhead to this at all - quite the opposite actually
>
> greets
> mark
>
> On 12 Jan., 21:21, RhythmicDevil <rhythmicde...@gmail.com> wrote:
>
> > Hi,
> > I did not want to type echo statements into my views so I took the
> > suggestion of the CakePHP docs and added the following function to my
> > app_helper:
>
> > public function output($string)
> > {
> >      echo parent::output($string."\n");
>
> > }
>
> > And I use it like this:
>
> >         <?php
> >                 $form->create($options = array('action' => 'login'));
> >                 $form->input('User.username');
> >                 $form->input('User.password');
> >                 $form->button(__('Login', true), array('type'=>'submit',
> > 'class'=>'ui-state-default'));
> >                 $form->end();
> >         ?>
>
> > The output looks like this:
>
> > <form id="LoginForm" method="post" action="/users/login">
> > <label for="UserUsername">Username</label>
> > <input name="data[User][username]" type="text" value=""
> > id="UserUsername" />
> > <div class="input text"></div>
> > <label for="UserPassword">Password</label>
> > <input type="password" name="data[User][password]" value=""
> > id="UserPassword" />
> > <div class="input password"></div>
>
> > <input type="submit" value="Login" class="ui-state-default" />
> > </form>
>
> > Why are the inputs not inside the divs where they belong? If I remove
> > the function and replace the echos for each of the form elements it
> > works. Seems wrong that I can write a function so that I dont have to
> > type an echo when using the helpers but then I have to manually add
> > the containing div.
>
> > One other related question. How do I accomplish using  the Html helper
> > method tableCells and placing form elements in the cells? I put the
> > form element method as an element of the array that is passed to the
> > tableCells method I get no output.
>
> > Any help would be appreciated.
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to