Up to now if you used the HTML or the form helper, you did it in the following way:
$form->input('User/password');
With changeset 4630 this approach has been deprecated in CakePHP 1.2 (but it will still work, of course). The new approach uses a dot notation:
$form->input('User.password');

why . instead of / ?
Consistency. E.g. SessionComponent and SessionHelper have used dot notation all along.
The only reason it’s been / up till now is because that’s the way it’s always been since the beginning. We are currently engaged in a major re-architecting of Cake’s form generators, and we decided to implement that change for data-access consistency across all elements of the framework.
I am very new into blogging and I would like know if you could help me in changing my template? Thanks
What about using it this way?
input(‘User/email’, array(‘size’ => ’30′));?>
I have been using it like the above.
The post got stripped..trying again.
using it like -
$html->input(‘User/email’, array(‘size’ => ’30′));
post got stripped..trying again.
using it this way?
\$html->input(‘User/email’, array(‘size’ => ’30′))
post got stripped..trying again.
have been using it this way -
\$html->input(‘User/email’, array(‘size’ => ’30′))
$html->input(‘User/email’, array(‘size’ => ’30′))
@all: Thanks for your comments.
@chef kc: I don’t know blogger.com, but I think it should be easy to change your template. Just experiment a bit and have a look at http://help.blogger.com/
@Mandy: Your code will still work, but if you use CakePHP from the 1.2 development branch you should use in the future:
$html->input('User.email', array('size' => '30'));It doesn’t work for me, I’m using v4636.
I saw this coming, glad it’s finally done.
@René: Hm, what does not work? The following simple form works for me:
echo $form->create(); echo $form->input('User.name'); echo $form->submit(); echo $form->end();$form->input(‘User.name’); gives me
sorry, gwoo told me to get the nightly and that fixed that, you can delete my posts
Hello! I’m discovering Cake!
When i’m using this way, it gives me something wrong like wrong Id for my input and div!
For echo $form->input(‘User.name’);
I have id=”UserUser.name” !
What can I do ?
@floptwo: Which version of Cake do you use? The dot notation is not yet supported in the releases, it is only available in the nightly builds or if you get the code directly from the repository.
HTH
Okay okay!
I understand!!!
Thank you !
[...] cakebaker [...]