Created
August 2, 2013 22:50
-
-
Save andrebian/6144099 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// código de sua View | |
echo $this->Form->input('email.'); | |
// importantíssimo existir o ponto após o nome do campo, ele quem determinará que é um array | |
// código do Controller | |
if ( $this->request->is('post') ) { | |
foreach( $this->request->data['Model']['email'] as $email ) { | |
$data[] = array('campos_desejados' => 'valores_desejados', 'email' => $email); | |
} | |
$this->Model->create(); | |
$this->Model->saveMany($data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment