php - CakePHP 1.3 - Getting nested data from Form->input()? -


i'm upgrading system cakephp 1.1 cakephp 1.3. in 1.1 able use html helper like:

$html->input('user/email'); 

to data nested in:

$this->data['user']['email'] 

in controller. know $html->input() has been replaced $this->form->input(). however, when try use:

$this->form->input('user/email') 

i get:

undefined offset: 2 [core\cake\libs\view\helpers\form.php, line 496] 

this coming because / in input. seems 1.3 doesn't using / specify data should returned nested. how might achieve equivalent of in 1.3? thank much!

in 1.3 use

$this->form->input('user.email'); 

to set input user model , email field.

if have set form correctly though, need email

for example

$this->form->create('user');  $this->form->input('email');  $this->form->end('submit'); 

but in short, answer specific question, replace / .


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -