私は次のフォームを持っています:
<?php
class Application_Form_RegistrationForm extends Zend_Form{
public function init(){
$country = $this->createElement('select', 'country');
$country->setLabel('country: ')
->setRequired(true);
$email = $this->createElement('text', 'email_address');
$email->setLabel('Email Address: ')
->setRequired(true);
$register = $this->createElement('submit', 'register');
$register->setLabel('Create new Account')
->setIgnore(true);
$this->addElements(array(
$country, $email, $register
));
}
}
?>
国のリストはcountry
、データベースのテーブルにあります。
とにかく、データベースから国の名前を国のドロップダウンリストに入力できますか?
どんな助けでも大歓迎です。
ありがとう