Hello all, I had a 2 radioButtons and I want to change a mask if RadioButton changed…
<?php echo $form->radioButtonList($model,
'typeMask',
array('Type1' => 'Type1', 'Type2' => 'Type2'),
array('separator' => ' '); ?>
<?php
$this->widget('CMaskedTextField', array(
'model' => $model,
'attribute' => 'attributeMask',
'mask' => $model->maskSelected,
'htmlOptions' => array('size' => 16, 'maxlength' => '14')
));
?>
and on my controller I had
class UserForm extends CFormModel {
public $typeMask= 'Type1';
public $maskSelected= '999.999';
public $attributeMask
.
.
.
So, how i can code to radioButton onChange run something on my form and change the maskSelected and re-render the maskText.
Starting now with Yii, sorry for newbie…
Thanks.