Hi all,
Almost every input field in a app comes with a <label/> tag and a
"title" attribute (hint). Therefore this structure is pretty common:
echo $form->input('login', array('label' => 'Your login', 'title' =>
'No spaces; only alphanumeric characters'));
echo $form->input('name', array('label' => 'Full name', 'title' =>
'Your full name as it will be published in the site'));
echo $form->input('password', array('label' => 'Password', 'title' =>
'At least 6 characters'));
I guess the views would look much nicer if these two could be defined
in the model instead, therefore uncluttering the views:
echo $form->input('login');
echo $form->input('name');
echo $form->input('password');
Or even just:
echo $form->inputs();
Of course, model default attributes still would be possible to be
overriden in the view (in the case of __('i18n') for example).
In order this to be possible, the model and the form class should be
extended a little bit. Should this feature be included in the core?
What do you think?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---