EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Allow reading of processed form in CrudController

Open pkly opened this issue 1 month ago • 0 comments

Currently it is impossible to read anything from the form, as the controller does not pass it to any events or protected functions. It's simply read, processed and discarded.

Short description of what this feature will allow to do: Allow custom processing of forms in edit/new actions.

Example of how to use this feature

        if ($newForm->isSubmitted() && $newForm->isValid()) {
            $this->processUploadedFiles($newForm);
            $this->processNewForm($newForm);

We could use it in our application as it does things EA really doesn't allow by default (injecting entities dynamically in subforms, main forms, etc.) right now I need to override the new method and manually look for the submit button, then find the values I passed (without processing from form), you can see how it's annoying.

It wouldn't be a lot of work either, since it's just 2 methods, that return void and do nothing by default. If accepted I could prepare the MR for it too.

pkly avatar Nov 20 '25 09:11 pkly