<?php use common\widgets\DynamicInput; ?>
<?php foreach($model->data as $key => $value){ ?>
    <?php if (is_array($value)){ ?>
        <?php foreach($value as $subkey => $subvalue){ ?>
            <div class="card">
                <div class="card-header text-white">
                    <h4 class="card-title text-white">
                        <?= \yii\helpers\Inflector::camel2words($key) ?> - <?= $subvalue->user ?>
                    </h4>
                </div>
                <div class="card-body">
                    <div class="row">
                        <?php foreach($subvalue->attributes as $attfield => $attvalue){ ?>
                            <?= DynamicInput::widget(['form' => $form, 'model' => $subvalue, 'name' => $attfield, 'format' => false]); ?>
                        <?php } ?>
                    </div>
                </div>
            </div>
        <?php } ?>
    <?php } ?>
<?php } ?>