Entity form "Team - Signup"
So first I create an Read Only entity form that display information about the event. I call the entity form "Team - Signup".
Then in the "Additional settings" I setup the "Create related record" function to create a new team using the "Create Team" insert entity form that I created earlier
Entity Form "Team Create"
Set entity reference on save
To ensure that the right event is related to this new team I also setup the "Set entity reference on save".
Entity Form metadata
To make sure the users is not prompted for unnessesary information I add Entity Form Metadata to prepopulate the fields that the system already know.
Creating a new entity permisson for the event entity that has the "append" and "append to" properties.
Adding a child entity permission for the adding of teams permissions
Adding the parent to the web role of "Authenticated users"
Make sure that you don't have overlapping entity permissions for the same entity. This will remove permissions - not add to them. Keep it clan!
Create a new page called "signup" and set entity form "Team - Signup" to display event information.
OBS! For this page to display the event information you must add the event ID to the url like this:
The portal event information look like this (only displaying the event title for now):
The button is the "Create related record" button
When I hit the button the entity form for creating a new team is displayed in a dialog