Hi,
Like described in the title, i’ trying to use a dropdownlist for post back page.
The post is receive in the controller but the value selected is empty.
Here is my dropdownlist
<?php echo CHtml::dropDownList('groupe',$groupe,
array("A"=>"A","B"=>"B","C"=>"C","D"=>"D","E"=>"E","F"=>"F","G"=>"G","H"=>"H"),
array(
'prompt'=>'--Choisir un groupe--',
'submit'=>CController::createUrl('classement'),
//'data'=>array('groupe'=>'js:this.value'),
)); ?>
Here is my controller
public function actionClassement($groupe="")
{echo $groupe;
if(isset($_POST['groupe'])){echo $_POST['groupe']."ici=".$groupe;
$groupe = $_POST['groupe'];
}echo 'test';
$model = Team::model()->getClassementByGroupe($groupe);
$games = array();
$games = Game::model()->getGameByGroupe($groupe);
//echo '<pre>test';echo print_r($model);echo '</pre>';
$this->render('classement',array(
'model'=>$model,
'groupe'=>$groupe,
'games'=>$games,
));
}
Thanks for your help