2 types of dropdown menu question

Hello,

I am not sure I understand correctly the manual here:

http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#activeDropDownList()-detail

How to add a simple pre-populated dropdown list in my form

and

How to add a dropdown list populated from the database?

I have managed to create one but it is not an input feld…




<div class="dropdown">

    <a href="#" data-toggle="dropdown" class="dropdown-toggle">Label <b class="caret"></b></a>

    <?php

        echo Dropdown::widget([

            'items' => [

                ['label' => 'DropdownA', 'url' => '/'],

                ['label' => 'DropdownB', 'url' => '#'],

            ],

        ]);

    ?>

</div>



Thank you so much.