i have "phone" model
and i want that we can make multi phone in one action
anyone knows how to setup it (view, controller)
now i hard coded for only 3phones in my _form:
<div class="form-group field-phone-phonenumber">
<?= Html::activeLabel($phones[0], 'PhoneNumber', ['class' => 'col-lg-2 control-label']) ?>
<div class="col-lg-3">
<?= Html::activeDropDownList($phones[0], 'PhoneType',
['Home' => 'Home', 'Office' => 'Office', 'Handphone' => 'Handphone'],
['class' => 'form-control', 'prompt' => 'Select Telephone...']) ?>
</div>
<div class="col-lg-3">
<?= Html::activeTextInput($phones[0], 'PhoneNumber', ['class' => 'form-control']) ?>
</div>
</div>
<div class="form-group field-phone-phonenumber">
<?= Html::activeLabel($phones[1], 'PhoneNumber', ['class' => 'col-lg-2 control-label']) ?>
<div class="col-lg-3">
<?= Html::activeDropDownList($phones[1], 'PhoneType',
['Home' => 'Home', 'Office' => 'Office', 'Handphone' => 'Handphone'],
['class' => 'form-control', 'prompt' => 'Select Telephone...']) ?>
</div>
<div class="col-lg-3">
<?= Html::activeTextInput($phones[1], 'PhoneNumber', ['class' => 'form-control']) ?>
</div>
</div>
<div class="form-group field-phone-phonenumber">
<?= Html::activeLabel($phones[2], 'PhoneNumber', ['class' => 'col-lg-2 control-label']) ?>
<div class="col-lg-3">
<?= Html::activeDropDownList($phones[2], 'PhoneType',
['Home' => 'Home', 'Office' => 'Office', 'Handphone' => 'Handphone'],
['class' => 'form-control', 'prompt' => 'Select Telephone...']) ?>
</div>
<div class="col-lg-3">
<?= Html::activeTextInput($phones[2], 'PhoneNumber', ['class' => 'form-control']) ?>
</div>
</div>
i can’t figure it out how yii2 to post data
and how to get data