Created
November 28, 2013 13:26
-
-
Save marcincodes/7691811 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
//add ctp | |
<div class="add topic form"> | |
<?php echo $this->Form->create('Theard'); ?> | |
<fieldset> | |
<legend><?php echo __('Add Topic'); ?></legend> | |
<?php | |
echo $this->Form->input('name'); | |
echo $this->Form->input('Post.body'); | |
?> | |
</fieldset> | |
<?php echo $this->Form->end(__('Submit')); ?> | |
</div> | |
//add class theard controller | |
public function add() { | |
if ($this->request->is('post')) { | |
$this->Theard->create(); | |
$this->Theard->saveAssociated($this->request->data, array('deep' => true)); | |
debug($this->request->data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment