Hello,
I am having a weired problem with a custom form widget.
The following is my controller
public $implement = [
'Backend\Behaviors\ListController',
'Backend\Behaviors\FormController',
'Backend\Behaviors\RelationController',
'Backend\Behaviors\ReorderController'
];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public $reorderConfig = 'config_reorder.yaml';
public $relationConfig = 'config_relation.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('My.Portfolio', 'main-menu-portfolio', 'side-menu-portfolio-items');
}
public function onShowBlockList(){
$block = CmsBlock::find(post('form_id'));
$blockConfigFields = $block->type;
$config = $this->makeConfig('$/my/cmsblocks/models/cmsblock/slider.yaml');
$config->model = $block;
$config->recordOnClick = "$.popup({ handler: 'onUpdateForm', extraData: { record_id: ':id' } });";
$widget = $this->makeWidget('Backend\Widgets\Form', $config);
$widget->bindToController();
$this->vars['widget'] = $widget;
return $this->makePartial('render_block_list');
}
but when i click the add repeater field i get the following error
A widget with class name 'formSlider' has not been bound to the controller" on line 585 of D:\work_new\my\modules\backend\classes\Controller.php
the slider.yaml is
fields:
slider:
label: Repeater
prompt: 'Add new item'
style: default
span: auto
type: repeater
form:
fields:
title_slider:
label: Text
span: auto
type: text
test:
label: Text
span: auto
type: text
Thank you in advance.