0

This code only shows the second field, I need both fields. Thanks.

<?php echo Tabs::widget([
'items' => [
    [
        'label' => 'One',
        'content' => $form->field($model, 'name'),
    'content' => $form->field($model, 'type'),
        'active' => true
    ],
    ........
Jan Beeck
  • 303
  • 8
  • 24
  • This link is very useful for this issue: http://stackoverflow.com/questions/28276855/split-activeform-fields-into-different-tabs-with-tabs-widget – Jan Beeck Jun 22 '16 at 00:01

2 Answers2

1

See docs

echo Tabs::widget([
    'items' => [
        [
            'label' => 'One',
            'content' => 'Anim pariatur cliche...',
            'active' => true
        ],
        [
            'label' => 'Two',
            'content' => 'Anim pariatur cliche...',
            'headerOptions' => [...],
            'options' => ['id' => 'myveryownID'],
        ],
        [
            'label' => 'Example',
            'url' => 'http://www.example.com',
        ],
        [
            'label' => 'Dropdown',
            'items' => [
                 [
                     'label' => 'DropdownA',
                     'content' => 'DropdownA, Anim pariatur cliche...',
                 ],
                 [
                     'label' => 'DropdownB',
                     'content' => 'DropdownB, Anim pariatur cliche...',
                 ],
            ],
        ],
    ],
]);
Vitaly
  • 1,261
  • 2
  • 10
  • 20
0
<?= Tabs::widget([
    'items' => [
        [
            'label' => 'General',
            'content' => $this->render('product_form1', ['model' => $model, 'form' => $form]),
            'active' => true
        ],
Jan Beeck
  • 303
  • 8
  • 24