Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- echo $form->field($phone, 'value')->widget(MultipleInput::className(), [
- 'max' => 6,
- 'min' => 1, // should be at least 2 rows
- 'allowEmptyList' => false,
- 'enableGuessTitle' => false,
- 'addButtonPosition' => MultipleInput::POS_HEADER
- ])
- ->label('Телефон');
- ...
- $phone = new Phone();
- $data = Yii::$app->request->post();
- if ($phone ->load($data)){
- $phone->save();
- var_dumb($phone);
- }
- ...
- object(commonmodelsPhone)#115 (9) {
- ["_attributes":"yiidbBaseActiveRecord":private]=>
- array(2) {
- ["value"]=>
- array(3) {
- [0]=>
- string(5) "12345"
- [1]=>
- string(5) "54321"
- [2]=>
- string(4) "1357"
- }
- ...
Add Comment
Please, Sign In to add comment