Custom Buttons in Relation Mange Popup

Hi! Is it possible to add a custom buttons to the footer of a modal in the relation widget?

config_relation.yaml:

posts:
    label: Posts
    list: $/test/posts/models/posts/columns.yaml
    form: $/test/posts/models/posts/fields_popup.yaml
    view:
        filter: $/test/posts/models/posts/scopes.yaml
        showSetup: true
        toolbarButtons: delete
        showSearch: true
    manage:
        recordsPerPage: 10
        showSearch: true

You could add a type: partial inside the fields.yaml of the model Post in your case.
You won’t be able to position it in the footer though, except maybe with eoms javascript magic, but you can display it as part the form fields flow.

1 Like

Hi Radek. You can add custom buttons or anything else with override the backend/behaviors/relationcontroller/partials/_manage_form.php. Copy this file to your plugins/your_plugin/controllers/your_controller folder and rename it to _relation_manage_form.php. Modify it as you need…

1 Like

Thank you @chris and @danielbidala, both solutions are great.
In my case your solution will work better @danielbidala.