Used Yii2 Decimal MaskedInput on TabularForm

I’m trying to use Decimal MaskedInput, but I can not find documentation on the correct use.

This my code




...

'attributes'=> [

...

                        'costo' => [

                                'type' => TabularForm::INPUT_WIDGET,

                                'widgetClass' => yii\widgets\MaskedInput::classname([

                                    'name' => 'masked-input',

                                    'clientOptions' => [

                                        'alias' => 'decimal',

                                        'digits' => 2,

                                        'digitsOptional' => false,

                                        'radixPoint' => '.',

                                        'groupSeparator' => ',',

                                        'autoGroup' => true,

                                        'removeMaskOnSubmit' => true,

                                    ],

                            ]),

...



the answer





                          'costo'=>[

				                'type'=> TabularForm::INPUT_WIDGET,

				                'widgetClass' => yii\widgets\MaskedInput::className(),

				                'options' => [

				                    'options' => [

				                        'class' => 'form-control',

				                    ],

				                    'clientOptions' => [

				                        'alias' => 'decimal',

    								    'digits' => 2,

    								    'digitsOptional' => false,

    								    'radixPoint' => ',',

    								    'groupSeparator' => '.',

    								    'autoGroup' => true,

    								    'removeMaskOnSubmit' => true,

				                    ]

				                ]

				            ],