Example #1
0
?>
		<?php 
echo $form->error($model, 'county');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'currency');
?>
		<?php 
//echo $form->textField($model,'currency');
?>
                <?php 
//echo $form->dropDownList($model, 'currency', CHtml::listData(CountryCurrency::model()->findAll(), 'id',function($model){ return $model->currency_code->currency_format.' '.$model->currency_code->country_dei; }),
echo $form->dropDownList($model, 'currency', CHtml::listData(CountryCurrency::model()->findAll(), 'id', 'currencyName'), array('prompt' => 'Währung auswählen'));
?>
                
		<?php 
echo $form->error($model, 'currency');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'street1');
?>
		<?php 
echo $form->textField($model, 'street1', array('size' => 45, 'maxlength' => 45));
?>
		<?php 
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return CountryCurrency the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = CountryCurrency::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }