I am looking at how to create my own custom field using a self implemented form field in Joomla 5.
I started my extension in the same way as the core extensions (https://github.com/joomla/joomla-cms/tree/5.0-dev/plugins/fields/) and put my own field in the /src/Field
directory of my Extension.
I have also tried to add the path via
FormHelper::addFieldPath(JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name . '/src/Field');
But my form field does not seem to be found. I think this, because the type
is always set to the default text
.
I now wanted to do further research. But I can't find the place where the form field is set. I only find a getField()
here. But no setField()
.
Where do I have to look?
Is there perhaps an example of a custom field that uses a self-created form field?