All of the form related methods that were in $html are now in $form
(which makes much more sense), but may be named differently.

You can also do this to remove the div as well.

$form->input('Model.fieldname', array('label' => false, 'div' =>
false));

I recommend using the $form->input method on all of your fields unless
you really need to do something unique. You can pretty customise these
quite a lot with the second param. I found looking through the source
code for these methods helped me gain a greater understanding of how
it all fits together.

Hope that helps,
Adam

On May 31, 10:41 am, Alessio <[EMAIL PROTECTED]> wrote:
> Nice, thanks dear, with this , very useful, the label disappar...
>
> Only some precisations..
>
>  $form->input('Model.fieldname', array('label' => false));
>
> this will generate a div wrapping the input field...
>
> If I need only a pure input field... some options ?
>
> It is not so graviuos having a Div , but only for precision, I want to
> know...
>
> So if YOu want a simple input field without any sort of code:
>
> <?php echo $form->text('name', array('class' => 'required'));?>
>
> Another precisation, I am searching to use the old method with the
> html helper, but the form field is not built correctly..
>
> <?echo $html->input ('ModelName.descrioption');?>
> where ModelName is my model
> but I get that html is not filled in in according to cake rules (data[]
> []), because i get this:
>
> <input name="ModelName"/>
> without Data[]
>
> SO, another problem, if I use manually without helper , when i post
> the form, the field lose the value...and the cake engine doesn t fill
> the value ....
>
> <input type="text" name="data[Model][description]"  />
>
> This is a problem for me, if I need use pure code...
>
> What I have to do? to refill this manually,,this is enough boring...
> with the power of Cakephp..
>
> Thanks for suggestions...
>
> On 31 Mag, 01:48, Adam Royle <[EMAIL PROTECTED]> wrote:
>
> > You must change a bit when moving from 1.1 to 1.2, pretty much
> > everything is still in there, just in a different form.
>
> > For your form/label issue... try doing this:
>
> > echo $form->input('Model.fieldname', array('label' => false));
>
> > Maybe if you work your way through the Cookbook (http://
> > book.cakephp.org/) or actually look at the source code you will
> > discover more.
>
> > Cheers,
> > Adam
>
> > On May 31, 4:25 am, Alessio <[EMAIL PROTECTED]> wrote:
>
> > > I want to ask some people, if it is a good idea, in general, passing
> > > to new version...
>
> > > I want for example to use, some old methods, and Cakephp Engine, often
> > > tells that , this or that is deprecated...
>
> > > First Question, I will stress you, often ;)...Very thanks
>
> > > Can I use the old helper $html..., I am trying to use it and the field
> > > in the form is not goodly filled in..
>
> > > If I use new helper $form My field is filled in with Label and other
> > > stuff...
>
> > > This is good for Css rules, but if I don't want this stuff?
>
> > > A little note...Is there a complete reference with example ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to