L
L
lllyx2019-12-15 19:52:21
Yii
lllyx, 2019-12-15 19:52:21

ActiveForm checkbox how to do in slider?

<?php
/**
 * @var $model \app\modules\copy\forms\HeaderForm;
 * @var $this \yii\web\View
 */
use yii\widgets\ActiveForm;
$check = [
        'stats' => [
            'b'=>'Регистрация и установка ЯМ/GA ',
            'c'=>'Установка 1 цели ЯМ/GA ,
            'd' => 'Регистрация сайта в Яндекс\Google ',
        ],
        'chat' => [
            'a'=>'Настройка контактных форм для заявок ',
            'f' => 'Установка Jivosite ',
            'o' => 'Интеграция квиза '
        ],
        'host'=>[
            'j' => 'Регистрация хостинга',
            'i' => 'Регистрация и подбор домена'
        ],
        'other'=>[
            's' => 'Солянка(Объеденить 2 сайта в один)',
            'e' => 'Копирование калькулятора, до 5 формул '
        ],

];
?>
<?php $form = ActiveForm::begin([
    'fieldConfig'=>[
        'options'=> ['class' => 'form-group label-floating mt-2 mb-1 is-empty']
    ]
]) ?>
    <div id="carousel-example-generic" class="ms-carousel carousel slide" data-ride="carousel">

        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            <div class="carousel-item active">
                <h2 class="color-primary">Заполните данные</h2>
                <?= $form->field($model, 'email')->label('<i class="zmdi zmdi-email"></i> Email Adress')->textInput();?>
                <?= $form->field($model, 'site')->label('<i class="fa fa-globe"></i> Введите URL сайта')->textInput();?>
            </div>
            <div class="carousel-item">
                <a class="go-step " data-step="0" href="#">Вернуться назад</a>
                <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="2" type="button"><i class="zmdi zmdi-email"></i> Статистика и поисковые системы</button>
                <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="3" type="button"><i class="zmdi zmdi-email"></i> Домен и хостинг</button>
                <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="4" type="button"><i class="zmdi zmdi-email"></i> Общение</button>
                <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="5" type="button"><i class="zmdi zmdi-email"></i> Другое</button>
            </div>
            <div class="carousel-item">
                <a class="go-step position-absolute" data-step="1" href="#">Вернуться назад</a>
                <h2 class="color-primary">Статистика</h2>
                <?= $form->field($model, 'check')->checkboxList($check['stats'], [
                        'class'=>'togglebutton'

                ])->label(false) ?>
            </div>
            <div class="carousel-item">
                <a class="go-step position-absolute" data-step="1" href="#">Вернуться назад</a>
                <h2 class="color-primary">Домен и хостинг</h2>
                <?= $form->field($model, 'check1')->checkboxList($check['host'], [
                    'class'=>'togglebutton'
                ])->label(false) ?>
            </div>
            <div class="carousel-item">
                <a class="go-step position-absolute" data-step="1" href="#">Вернуться назад</a>
                <h2 class="color-primary">Общение</h2>
                <?= $form->field($model, 'check2')->checkboxList($check['chat'], [
                    'class'=>'togglebutton'
                ])->label(false) ?>
            </div>
            <div class="carousel-item">
                <a class="go-step position-absolute" data-step="1" href="#">Вернуться назад</a>
                <h2 class="color-primary">Другое</h2>
                <?= $form->field($model, 'check3')->checkboxList($check['other'], [
                    'class'=>'togglebutton'
                ])->label(false) ?>
            </div>
        </div>
    </div>


    <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="1"  type="button"><i class="zmdi zmdi-email"></i> Дополнительные услуги</button>
    <button class="btn btn-raised btn-primary btn-block withoutripple go-step" data-step="0" type="submit"><i class="zmdi zmdi-email"></i> отправить</button>
<?php $form = ActiveForm::end();

Hello everyone
Can you please tell me how to get rid of check1, check2, check3? Render via HTML helper?

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