Hope this is the correct place to post this.
Not sure if this is a bug or something I'm doing wrong.

I'm using Drupal Core 8.3.6
I'm also using the module Automatic Entity Labels (auto_entitylabel), not sure if that is relevant.

I have a content type "Event"
In that content type I have an entity reference field that refers to another conent type "Package"

The entity reference field is not set to required.
None of the fields in "Package" are set to required, except the title obviously, which I cannot change.

My form display for events is set to 'Inline entity form - Simple'
So my "Package" has the following fields: Title, Description, Price
Those fields all show when creating an Event. And the title field has the required star.

When creating an Event, I cannot save it while the "Package" fields are empty.
Even though they are all set to not required, the title is still a required field.

When I do create an Event that has multiple Packages I am able to save it and all works well.
But then when I want to remove one of the Packages there is no remove option anywhere.
Clearing the data gives an error that the fields are required, same as trying to leave the fields empty.

Comments

Jodan created an issue. See original summary.

Pascal-’s picture

Issue summary: View changes
HakimR’s picture

Hi Jodan,

I am having exactly same issue and I am interrested on having a solution for that. I am for the moment by passing the issue by doing manual validation of fields in a hook_form_alter.
I am stil looking to a solution to easily remove the empty inline entity forms before saving the entity...

Hakim

thomasmurphy’s picture

I found that the complex widget allows this behaviour with inline entity form, and isn't really that complex.

HakimR’s picture

Yes #4, but simple and complex forms are definately not the same.

We are looking to have the simple form widget (display style) with a delete action...

Hakim