Using bootstrap multiselect in the form, it is necessary to substitute the values from the address bar into the multi-select. To transfer a single value, I used the following construction:
<?php $value = \Yii::$app->request->get($name) ?: ''; ?> <div class="<?= $class ? $class : "col-sm-3 col-xs-12" ?>"> <label><?= $label ?></label> <select name="<?= $name ?>" multiple="multiple"> <?php foreach ($source as $id => $val) { ?> <option <?= $value == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $val ?></option> <?php } ?> </select> </div> Now the array is transferred, how to implement the substitution of all array values?