Iām trying to create new hidden field, but getting error:
Neither template or render method provided nor extending a component when loading plugin component āk-custom-fieldā. The component has not been registered.
index.php
Kirby::plugin('afbora/custom', [
'fields' => [
'custom' => [
'computed' => [
'value' => function () {
$value = $this->value;
if (empty($value) === true) {
$value = uniqid();
}
return $value;
}
]
]
]
]);
index.js
panel.plugin("afbora/custom", {
fields: {
custom: {
template: ''
}
}
});