Community

Entity Reference field that allows creation of new entities

Hi all,

I've been setting up and maintaining a Drupal-website on the topic of Quizzing.

I've been using content types to create 'quizzes' , from which a calendar is generated and a content type 'quiz team' to register teams .

The following project would be to create a content type 'Quiz results' in order to have users add results, which I would like to use to generate a ranking. This would just be a form with fields 'Position 1= Quiz Team X', Position 2=quiz team Y', etc...

I like the auto-completion functionality for the 'Entity Reference'-field: I have a list of registered 'quiz teams', and the auto-completion works quite fast, which makes it easy to complete such a 'Quiz result' Form. Typically, one would have to fill out a form with the names of the first 15 teams to complete such a 'Quiz result' form. Hope this still makes any sense.

Now, the problem is that it is quite common for a new team to appear in the quiz results. If it's not registered yet, I would like the user to just input the name of the new team and have Drupal generate a new entity of the type 'Quiz Team' with that name, so that this name can be retrieved from the autocompletion-list the next time this quiz team gets a result. But this does not seem to be possible with the Entity Reference field.

I've been searching for a way to do this with existing Drupal-modules, but I'm quite new to all this, so I 'm probably looking in the wrong places.

Any guidance, tips, would be most welcome.

Comments

I am not sure I fully

I am not sure I fully understand your need but from what I can tell the inline entity form module may be what you need here.