Chtml Cmaskedtextfield Do Not Send Any Value?!

I have CMaskedTextField in my form, when i fill it, the $_POST[] do not return any value for it!? :huh:




<?php echo CHtml::label(Yii::t('models', 'form.label.position'), 'position'); ?>

    	<?php

    	$this->widget('CMaskedTextField', array(

        	'model' => null,

        	'name' => "position",

        	'mask' => '999',

        	'htmlOptions' => array(

            	'size' => 5,

            	'placeholder' => Yii::t('models', 'form.hint.position'),

            	'title' => Yii::t('models', 'form.hint.position'),

        	),

    	));

    	

    	?>



Try removing model like this:




<?php echo CHtml::label(Yii::t('models', 'form.label.position'), 'position'); ?>

        <?php

        $this->widget('CMaskedTextField', array(

                'name' => "position",

                'mask' => '999',

                'htmlOptions' => array(

                    'size' => 5,

                    'placeholder' => Yii::t('models', 'form.hint.position'),

                    'title' => Yii::t('models', 'form.hint.position'),

                ),

        ));

        

        ?>



I did so, but no changes happen. There is no return by $_POST[‘position’] and also is NULL.

What is the problem?

up…

B):huh:

This all my code for C




$this->widget('CMaskedTextField', array(

      	'name' => 'position',

      	'mask' => '999',

      	'value'=> isset($model['position']) ? $model['position'] : '',

      	'htmlOptions' => array(

      	'size' => 5,

      	),

      	)); 



What does the rendered html look like?

In html it render :

[html]<input size="5" placeholder="Position of the question" title="Position of the question" id="position" type="text" name="position" />[/html]