I need to build a user data structure that includes child entities.
I've got a custom module that defines a child entity to the user object. When i add the entity reference to the user in the CMS back-end I get the options of autocomplete/checkboxes, but I'd like to have the form instead that will allow you to either add new content for the child entities or update existing ones.
This would need to be on the default user registration form as well.
I'm currently looking at Entity form render and if i can use that some how to render the form elements for the entities.
Side note: they can have up to N reference entities when they register. so it has to be repeatable as well.
Edit I've attempted to do this through extending the UserRegisterForm class supplied in Drupal core but this didn't address the issue of creating a repeatable field and I couldn't figure out how to easily pull in the form elements for the Entity I created. I started looking into the Entity Form render methods mention on here as mentioned above to try and address this for the the inline_entity_form module was suggested.
I was also looking into doing a complete stand alone HTML build of the registration form then using the REST module to submit the data via an AJAX request as i would of then been able to re-use this component in the account section with some edits to enable the auto population.