I'm new to October CMS and learning to create a Form Widget. But I'm getting the following error :
The partial '_field_actorbox.htm' is not found.
/opt/lampp/htdocs/octobermovies/modules/system/traits/ViewMaker.php line 65
My widget folder name is 'formwidgets' My partials file name inside partials folder is '_widget.htm' Content of my formwidgets > Actorbox.php
namespace Watchlearn\Movies\FormWidgets;
use Backend\Classes\FormWidgetBase;
use Config;
class ActorBox extends FormWidgetBase
{
public function widgetDetails()
{
return [
'name' => 'Actorbox',
'description' => 'Field for adding actors'
];
}
public function render(){
return $this->makePartial('widget');
}
public function loadAssets()
{
$this->addCss('css/select2.css');
$this->addJs('js/select2.js');
}
}
My code to register the widget in plugin.php
public function registerFormWidgets()
{
return [
'Watchlearn\Movies\FormWidgets\ActorBox' => [
'label' => 'ActorBox Field',
'code' => 'actorbox'
]
];
}
I tried to find and looked into the documentation also but could not find any solution for this.