How to get data from different model for select?
问题 I have form with some attributes: class ToraForm extends Form { public function __construct($name = null) { parent::__construct('tora'); $this->setAttribute('method', 'post'); $this->add(array( 'name' => 'id', 'attributes' => array( 'type' => 'hidden', ), )); $this->add(array( 'name' => 'name', 'attributes' => array( 'type' => 'text', 'required' => true, ), 'options' => array( 'label' => 'name', ), )); } but I want add drop-down list with data taken from another model. How to do it? 回答1: