Created
April 21, 2011 00:59
-
-
Save romaimperator/933435 to your computer and use it in GitHub Desktop.
This file contains 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
<------- View randoms/add.ctp --------> | |
<?php | |
echo $this->Form->create('Random'); | |
echo $this->Form->input('Random.start_time', | |
array( | |
'type' => 'time', | |
) | |
); | |
echo $this->Form->end('Submit'); | |
?> | |
<------- View randoms/add.ctp --------> | |
<------- Model random.php ---------> | |
<?php | |
class Random extends AppModel { | |
var $useTable = false; | |
} | |
?> | |
<------- Model random.php ---------> | |
<------- Model randoms_controller.php ---------> | |
<?php | |
class RandomsController extends AppController { | |
var $uses = array('Random'); | |
var $helpers = array('Form'); | |
function add() { | |
$this->data['Random']['start_time'] = "18:15"; | |
} | |
} | |
?> | |
<------- Model randoms_controller.php ---------> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment