CakePHP View謫堺ス Form繝倥Ν繝代シ

繝輔か繝シ繝

<?= $this->Form->control(
縲縲'test',
縲縲["type"=>"file"]
縲)
?>
縲ス
<?= $this->Form->end() ?>

繝繧ュ繧ケ繝

<?=$this->Form->text('Models.methodNm') ?>

繝繧ュ繧ケ繝医お繝ェ繧「

<?=$this->Form->textarea(
縲縲'Models.methodNm',
縲縲[
縲縲縲縲'rows'=>'10',
縲縲縲縲'cols'=>'10'
縲縲]
) ?>

繝ゥ繧ク繧ェ繝懊ち繝ウ

<?=$this->Form->radio(
縲縲'Models.methodNm',
縲縲[
縲縲縲縲['text'=>'陦ィ遉コ', 'value'=>'1'],
縲縲縲縲['text'=>'髱櫁。ィ遉コ', 'value'=>'0', 'checked' => true]
縲縲縲縲['default' => 1]
縲縲]
) ?>

繧サ繝ャ繧ッ繝医懊ャ繧ッ繧ケ

<?= $this->Form->input('Models.methodNm', [
縲 'type' => 'select',
縲 'options' =>
縲縲[
縲縲縲縲['text'=>'1,000蜀', 'value'=>'1000'],
縲縲縲縲['text'=>'2,000蜀', 'value'=>'2000'],
縲縲縲縲['text'=>'3,000蜀', 'value'=>'3000'],
縲縲],
遨コ逋ス陦ィ遉コ
縲 'empty' => true,
蛻晄悄蛟、
縲 'default' => -1,
縲 'label' => '']) ?>

縲織B蛟、繧定。ィ遉コ縲
窶サ繧ウ繝ウ繝医Ο繝シ繝ゥ
$this->Test = TableRegistry::get('test');

$test = $this->Test
縲->find()
縲->select(['id', 'test_nm'])
縲->all()
縲->combine('id', 'test_nm')
縲->toArray();

$this->set(compact('test'));

窶サ繝薙Η繝シ
<?= $this->Form->select(
縲縲"test",
縲縲$test,
縲縲['default'=>$test['id']]
縲)
?>

繝√ぉ繝繧ッ繝懊ャ繧ッ繧ケ

<?= $this->Form->input('dl_flg',
縲縲[
縲縲縲縲'type' => 'checkbox',
縲縲縲縲'value' => '1',
縲縲縲縲'label' => '繝繧ヲ繝ウ繝ュ繝シ繝',
縲縲縲縲'checked' => true,
縲縲縲縲'hiddenField' => false
縲縲]
); ?>

繝昴せ繝医Μ繝ウ繧ッ

<?= $this->Form->postLink( 'Models.methodNm', '/繧ウ繝ウ繝医Ο繝シ繝ゥ蜷/繝。繧ス繝繝牙錐' ) ?>

hidden

<?= $this->Form->hidden('Models.methodNm' , ['value' => 123 ]) ?>

繝輔ぃ繧、繝ォ繧「繝繝励Ο繝シ繝

<?=$this->Form->file('Models.methodNm') ?>

繧ォ繝繧エ繝ェ繝シCakePHP