0
  • I have two Entities: quiz and question.
  • The quiz has an entity_reference field questions.
  • I have a page /quizzes/{quiz}/questions that links to a "Add Question" page /quizzes/{quiz}/questions/add

Where do I add the functionality to ensure that when the question is added it gets associated to the quiz (preferably as the last item).

  • 1
    This type of problem is usually structured in a way that the child entity has the ER field and is referencing the parent. You have it in reverse. In your case you want to create a new entity and update another entity at the same time. You can probably do that with the help of Rules module or similar. If you can change your structure so the question has the ER field referencing a quiz then you can use Prepopulate module. – prkos Jun 21 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.