public
Created

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<------- 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 --------->

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.