N
N
nnkrasovok2019-04-23 10:49:28
Yii
nnkrasovok, 2019-04-23 10:49:28

Why is the checkbox not accepting its own template?

In the registration in the label checkbox'a in the template I inserted a link. displayed correctly and worked

<?= $form->field($model, 'checkbox')
                                  ->checkbox([
                                      'labelOptions' => [
                                          'class' => 'checkbox-inline'
                                      ],
                                      'label' => '  Я согласен(а) с',
                                      'template' => "{input}{label} <a href=\'#\'>условиями пользовательского соглашения</a>",
                                      'onchange' => "document.getElementById('submit').disabled = !this.checked",
                                      'disabled' => false
                                  ]); ?>

5cbec25e68ef7184624754.jpeg
in browser shows
5cbec2d2cadd5192458995.jpeg
then installed module yii2-user. registration is different. I inserted the same code there, then the result is the same
5cbec32d0d1b1857639421.jpeg
in the browser, so
5cbec37428c21200389834.jpeg
Why? something went wrong?

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