A
A
ART42021-09-22 18:20:08
PHP
ART4, 2021-09-22 18:20:08

Yii2 attributes??

Good evening, how can I add an attribute to each data-lang element?

print $form->field($regModel, 'helps')->checkboxList([
                  '1' => Yii::t('content', $regModel->List['helps'][1]),
                  '2' => Yii::t('content', $regModel->List['helps'][2]),
                  '3' => Yii::t('content', $regModel->List['helps'][3]),
                  '4' => Yii::t('content', $regModel->List['helps'][4]),
], ['class' => 'btn-list mob-w100', 'onclick' => 'onInputClick(this, "checkbox")'])->label(false);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question