'form-group form-group-phone-' . ( isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ), 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, ]) ?>
registerJs($js, $this::POS_LOAD); ?>

Добавить еще

context->id . " = " . $i . "; var start_label_" . $this->context->id . " = " . $label . "; $(document).on('click', '.add_field_" . $this->context->id . "', function() { var block = $(this) .siblings('.field_list'); var block_id = $(this).parent('fieldset'); ++start_label_" . $this->context->id . "; var sub_block = '
context->id . "+'\" >' + '
' + '' + 'context->id . " + '\" type=\"tel\" placeholder=\"+xx(xxx)xxx-xx-xx\" class=\"form-control custom-input-2\" value=\"\" name=\"Fields[phone][' + start_i_" . $this->context->id . "++ + '][0][phone]\" />' + '
' + '
'; block.append(sub_block); $('#w0').yiiActiveForm('add', { container: '.form-group-phone-'+start_label_" . $this->context->id . ", error: '.help-block', id: 'cont-phone-'+start_label_" . $this->context->id . ", input: '#cont-phone-'+start_label_" . $this->context->id . ", name: 'Fields[phone][' + start_label_" . $this->context->id . "++ + '][0][phone]', validate: function(attribute, value, messages, deferred) {yii.validation.regularExpression(value, messages, {'pattern':/^\+?(?:\d{0,3})?[\(\s]?\d{0,5}[\)\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2}$/,'not':false,'message':'Телефон введен неверно . ','skipOnEmpty':1});} }); }); "; $this->registerJs($js, $this::POS_LOAD); ?>