Right now we can inject a custom form into preprocessForm with onContentPrepareForm event from a plugin group.
Issue is when trying to save the form it does not inject the plugin group name into preprocessForm and the controller validation remove the custom data entered into the form data.
This line should be extended with the plugin group value of the preprocessForm function. As right now it will always load the 'content' group and there is no way to override it.
Be able to load plugin group for preprocessForm on save.
Not possible.
Joomla 4.2
Maybe add an $options['group'] as the would be hard to extend the loadForm function with a new parameter.
Example:
$this->preprocessForm($form, $data, $options['group']);
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
?
|
True didn't think of that. But would be nice if core fixed it out of the box.
Sounds valid.
Note: Currently if you use own model, you can override preprocessForm and load your plugin group
joomla-cms/libraries/src/MVC/Model/FormBehaviorTrait.php
Lines 163 to 170 in 1d3ca40