shgninc
(Shgninc)
1
I have CMaskedTextField in my form, when i fill it, the $_POST[] do not return any value for it!?
<?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'),
),
));
?>
laqrhead
(Joel)
2
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'),
),
));
?>
shgninc
(Shgninc)
3
I did so, but no changes happen. There is no return by $_POST[‘position’] and also is NULL.
What is the problem?
shgninc
(Shgninc)
4
up…
This all my code for C
$this->widget('CMaskedTextField', array(
'name' => 'position',
'mask' => '999',
'value'=> isset($model['position']) ? $model['position'] : '',
'htmlOptions' => array(
'size' => 5,
),
));
laqrhead
(Joel)
5
What does the rendered html look like?
shgninc
(Shgninc)
6
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]