I am trying to access the field value inside a field-plugin. I thought i could acces it like so:
my code:
<?php
Kirby::plugin('jb/myfield', [
'fields' => [
'myfield' => [
'props' => [],
'computed' => [
'testing' => function(){
return $this->value;
}
],
]
],
]);
But that always returns null. What am i missing?
For context: my ultimate goal would be to disable the field depending on the field value.
(I checked out the native kirby fields and it looks as if this should work: kirby/config/fields/textarea.php at main · getkirby/kirby · GitHub)
I am on Kirby v5.0.0
thanks in advance! <3
joscha