I have a custom entity (with the name Entity Quote), from the add form of this entity I make a multistep form.
In the custom entity Entity Quote, I added another custom entity (with the name Quote Design) as a reference field(with the name Design) to add the form of the second custom entity Quote Design to the second form step of the first custom entity Entity Quote. And I implemented adding the form of the second custom entity using the module Inline Entity Form:
https://www.drupal.org/project/inline_entity_form
Where for the reference field I chose in the Manage Form Display the widget: Inline entity form - Complex
But the problem is that only the fields on the first step of the form are saved where the fields of the first custom entity (Entity Quote), on the second step where the two fields of the second custom entity (Quote Design) the data is not saved. The data is not in the tables and, accordingly, is not in the UI either.
The save()
method is executed after pressing the Save button, which appears on the second step of the form.
Implementation of multistep form (Entity Quote add form) in sandbox:
https://phpsandbox.io/n/divine-grass-1doo-ylab7