form->inputで選択肢とラベルを出したい
- コントローラーでselectorsに入れておく
$this->set('selectors', $this->Selector->find('list'));
- ビューで選択肢selectorsが使われ、ラベルも出る
<?php echo $this->Form->input('selector_id', array('label' => 'セレクタ名')); ?>
-
- HABTMもできる
$this->set('selectors', $this->Selector->find('list'));
<?php echo $this->Form->input('selector_id', array('label' => 'セレクタ名')); ?>