OK AD! Thank's for your help. >>>>How so? Irrespective of how html represents it, it's user input. Yes, all fields in a form are "user input", but in (X)HTML and semantic context, a "textarea" is different to a "text input"! And if a method is called "textarea" and an other "input", the developer is tempted using each to keep some coherence with HTML syntax...
I've understood "inputs" method, but I've made some tests and it didn't work fine... I'll try it again. BR, Avairet On 9 nov, 11:12, AD7six <[EMAIL PROTECTED]> wrote: > On Nov 9, 10:13 am, avairet <[EMAIL PROTECTED]> wrote: > > > Hello and thank's for replies! > > > Do you know if it's scheduled to optimize the "$form->textarea" method > > in next releases? > > Because is not "natural" using "$form->input" for this kind of > > field... > > How so? Irrespective of how html represents it, it's user input. > > Try some more cakey code, you might like it: > > [code] > <h2>Ajout article</h2> > <?php > echo $errorMessage; > echo $form->create('Article'); > echo $form->inputs( > 'Article.titre', > 'Article.sous_titre', > 'Article.chapeau', // /*Only if the default isn't what you want > */ => array('type' => 'x'), > 'Article.contenu', > 'Article.auteur', > ); > echo $form->submit('Enregistrer); > echo $form->end(); > ?> > [/code] > > Note that > inputs just calls input in a loop with whatever you pass it. > you only need to define params where the defaults are not what you > want. and it looks like you only want the defaults. > > > and it's not practical using 3 instructions instead of 1! > > So stop using the building block methods and use input/inputs instead. > > > The same problem exists within "$form->checkbox"... > > By design ;) > > hth, > > AD > > > > > Bye > > > Avairet > > > On 8 nov, 19:45, Radish <[EMAIL PROTECTED]> wrote: > > > > maybe instead of > > > > echo $form->textarea('Article.contenu'); > > > > use > > > > echo $form->input('Article.contenu', array( > > > 'type' => 'textarea' > > > )); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---