Is it possible to get form from resource and add it to createOptionForm?
As the title says, I don't like having to repeat the content of the form in a section and in any other select field that has a createOptionForm method on it.
I guess I can just put it on a helper function in a service class or something but I was wondering if it would be possible to do it in a nicer way.
I guess I can just put it on a helper function in a service class or something but I was wondering if it would be possible to do it in a nicer way.
Solution
So we do it like this within the activity plugin:
$form = static::getResource()::form(new Form($this));
You could also put a static array return function within the resource file and call that single function each time
$form = static::getResource()::form(new Form($this));
You could also put a static array return function within the resource file and call that single function each time