Answer the question
In order to leave comments, you need to log in
Yii2. Active Record work with multiple fields?
<div class="form-group field-signupcompanyform-phone">
<label class="control-label">Телефон</label>
<input type="text" name="SignupCompanyForm[phone][]" class="form-control">
<div class="help-block"></div>
<input type="text" name="SignupCompanyForm[phone][]" class="form-control phone-group">
<input type="text" name="SignupCompanyForm[phone][]" class="form-control phone-group">
<input type="text" name="SignupCompanyForm[phone][]" class="form-control phone-group">
</div>
$model->load(Yii::$app->request->post())
fills all properties except $phone
Answer the question
In order to leave comments, you need to log in
1. Add phone to the validation rules
2. Define the SignupCompanyForm::setPhone($phones = []) method, in which the passed data will be processed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question