Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class is not working #51

Closed
claudiogg88 opened this issue Oct 26, 2015 · 1 comment
Closed

class is not working #51

claudiogg88 opened this issue Oct 26, 2015 · 1 comment
Labels

Comments

@claudiogg88
Copy link

why my option 'class' => 'form-control', is not being applied??

  echo \unclead\widgets\TabularInput::widget([
        'models' => $model->Tributos,
        'columns' => [
            [
                'type' => Form::INPUT_TEXT,
                'options' => ['readonly' => true, 'maxlength' => 45],
                'name' => 'Nombre',
                'title'=>'Nombre'
            ],
            [
                'name' => "BaseImponible",
                'title'=>'Base Imponible',
                'type' => \yii\widgets\MaskedInput::className(),
                'options' => [
                    'class' => 'form-control',
                    'mask' => '999-999-99-99'
                ]
            ]
        ],
    ]);
<td class="list-cell__BaseImponible"><div class="form-group field-comprobantetributo-4-baseimponible"><input type="text" id="comprobantetributo-4-baseimponible" name="ComprobanteTributo[4][BaseImponible]" data-plugin-inputmask="inputmask_892303c7"></div></td>

image

thanks!!

@unclead unclead added the bug label Oct 26, 2015
@unclead
Copy link
Owner

unclead commented Oct 26, 2015

You have to use the following definition to achieve your aims

        [
            'name' => "BaseImponible",
            'title'=>'Base Imponible',
            'type' => \yii\widgets\MaskedInput::className(),
            'options' => [
                'mask' => '999-999-99-99',
                'options' => [
                    'class' => 'form-control',
                ]
            ]
        ]

Probably it's not so transparent and we have to add info about this use case to tips and tricks section of README.

@unclead unclead closed this as completed Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants