Hi,
i’m using an Widget to greate an CActiveForm, like this:
$form = $this->beginWidget('CActiveForm', array(
'id'=>$game[matchID],
'enableClientValidation'=>true,
'action'=>CHtml::normalizeUrl(array('myc/mya')),
'method'=>'get',
));
Part of this form are some hidden fields, which should be filed with an value:
echo $form->hiddenField($model,'matchID',array('value'=>'123'));
The Point is: the hidden input field is renderd as an part of the form, but the value is not set.
Is there any typo, I don’t see??
I’m thinking about this problem since an hour but can’t find the reason.
The renderd HTML Code looks like this:
<input id="Mymodel_matchID" type="hidden" name="Mymodel[matchID]" value=" ">
As you can see: value is an "space".
But why?
Thank you rall0r
//Edit: it looks like, CActiveForm removes all the values an set it to " ". Is this possible?
The following "works"
echo $form->hiddenField($model,'matchID',array('XXvalue'=>'123'));
Here XXvalue get’s the value 123. But CActivForm doesn’t post XXvalue to the Form-action. (which is correct)