Skip to content

Create / Edit / Delete related items within another type form #8582

@henricazottes

Description

@henricazottes

Feature request

Please describe your feature request

  • I have created my request on the Product Board before I submitted this issue
  • I have looked at all the other requests on the Product Board before I submitted this issue

Summary

Add a modal to the create/edit/delete form allowing the user to manage related items.

Why is it needed?

I'm frustrated when I want to create a Company which has_many Contacts.
I either need to:

  • first create Contacts, navigate to the Company form view, select Contacts
  • first create the Company, navigate to the Contacts form view, select the Company

In both cases I need to switch views, which is cumbersome.

Suggested solution(s)

I'd like to have in the dropdown of related fields of the Company:

  • Create item button which would open a modal to the given type creation form
  • Edit item button which would open a modal to the given type editing form
  • Delete item button which would delete the related item with a confirmation modal

Despite the has_many relationship which is bidirectional, we could add a "Modal Edit" option to relations like so:

image

Those checkbox would appear depending on the relation's direction. Here its on each side as it's a bidirectional one.

In my example, we might want to manage Contacts within a Company but not the way around, so checking only the left side option.
We might prefer a link to navigate to the Company's form when we are in the Contact form.

This last point is already implemented for has_many relations as you can click on the name of the Company in Contact form:

has_many:
image

But for belongs_to relations it's in the form of a Details link, which isn't very obvious at the first place:
belongs_to:
image

Maybe unify the UX a bit more here?

Related issue(s)/PR(s)

There was an attempt to implement this here #5125 but the approach, ux and strapi tools weren't ready.

There is also a ticket on ProductBoard and a topic on Strapi's forum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions