src/widget/DynamicField.php
public function registerAssets(){
        $view = $this->getView();
        if($this->mask && $this->maskType){
            AdminUiInputMaskAsset::register($view);
            $this->clientOptions = [$this->maskType => $this->mask];
            $this->registerPlugin('inputmask');
        }
        
        //$totalClientlength = count($this->form->attributes);
        
        
        //$form_client_option = Json::encode($this->getClientOptions());
        //print($form_client_option);
        $form_client_option = $this->getClientOptions();
        
        AdminUiDynamicFormAsset::register($view);
        $id = $this->getId();
        $js = "jQuery('#$this->clientId').dynamicForm(\"#{$id}_add\",\"#{$id}_del\",".'{
                limit:10,
                data:'.Json::encode($this->data).',
                normalizeFullForm:false,
                normalizeSource:false,
                afterRemoveAll:function(){
                    jQuery("#'.$this->getId().'_dis").remove();
                },
                afterInit:function(){
                    console.log("call after initialize");
                },
                cloneDone:function(clone){
                    console.log("call after clone done");                    
                    //console.log(jQuery(clone));
                    if(jQuery(".'.$this->clientId.'").length>0 && jQuery("#'.$this->getId().'_dis").length==0){
                        jQuery("#'.$this->clientId.'").find(".input-group-btn").append(jQuery(\''.Html::tag('button','<i class="fa fa-minus"></i>',['id' => $this->getId().'_dis','class'=>'btn disabled']).'\'));                        
                    }
                    
                    var validate = '.Json::encode($this->getClientOptions()).';
                        

                    var id;
                    jQuery(clone).find("input, checkbox, select, textarea").each(function(){
                        id = jQuery(this).attr("id");
                    });
                    
                    validate.id = id;
                    validate.input = "#"+id;
                    validate.container = "#"+jQuery(clone).attr("id");
                    
                    jQuery("#'.$this->form->id.'").yiiActiveForm("add",validate);
                    
                },
                beforeRemove:function(clone){
                    console.log("call before removing clone");
                    //console.log(clone);
                    //console.log(jQuery(clone));
                    
                    var id;
                    jQuery(clone).find("input, checkbox, select, textarea").each(function(){
                        id = jQuery(this).attr("id");
                    });
                    
                    jQuery("#'.$this->form->id.'").yiiActiveForm("remove",id);
                }
            });';
        $view->registerJs($js);
        //$this->clientOptions = ["#plus", "#minus", {limit:5}];
        
    }
public function registerAssets(){
        $view = $this->getView();
        if($this->mask && $this->maskType){
            AdminUiInputMaskAsset::register($view);
            $this->clientOptions = [$this->maskType => $this->mask];
            $this->registerPlugin('inputmask');
        }
        
        //$totalClientlength = count($this->form->attributes);
        
        
        //$form_client_option = Json::encode($this->getClientOptions());
        //print($form_client_option);
        $form_client_option = $this->getClientOptions();
        
        AdminUiDynamicFormAsset::register($view);
        $id = $this->getId();
        $js = "jQuery('#$this->clientId').dynamicForm(\"#{$id}_add\",\"#{$id}_del\",".'{
                limit:10,
                data:'.Json::encode($this->data).',
                normalizeFullForm:false,
                normalizeSource:false,
                afterRemoveAll:function(){
                    jQuery("#'.$this->getId().'_dis").remove();
                },
                afterInit:function(){
                    console.log("call after initialize");
                },
                cloneDone:function(clone){
                    console.log("call after clone done");                    
                    //console.log(jQuery(clone));
                    if(jQuery(".'.$this->clientId.'").length>0 && jQuery("#'.$this->getId().'_dis").length==0){
                        jQuery("#'.$this->clientId.'").find(".input-group-btn").append(jQuery(\''.Html::tag('button','<i class="fa fa-minus"></i>',['id' => $this->getId().'_dis','class'=>'btn disabled']).'\'));                        
                    }
                    
                    var validate = '.Json::encode($this->getClientOptions()).';
                        

                    var id;
                    jQuery(clone).find("input, checkbox, select, textarea").each(function(){
                        id = jQuery(this).attr("id");
                    });
                    
                    validate.id = id;
                    validate.input = "#"+id;
                    validate.container = "#"+jQuery(clone).attr("id");
                    
                    jQuery("#'.$this->form->id.'").yiiActiveForm("add",validate);
                    
                },
                beforeRemove:function(clone){
                    console.log("call before removing clone");
                    //console.log(clone);
                    //console.log(jQuery(clone));
                    
                    var id;
                    jQuery(clone).find("input, checkbox, select, textarea").each(function(){
                        id = jQuery(this).attr("id");
                    });
                    
                    jQuery("#'.$this->form->id.'").yiiActiveForm("remove",id);
                }
            });';
        $view->registerJs($js);
        //$this->clientOptions = ["#plus", "#minus", {limit:5}];
        
    }
Registers the needed assets