1

I am working on custom quiz module, where we have Multiple choice questions. We have created separate field collections for Question and it's options. Author can add unlimited number of question and it's answers.

While creating a new multiple choice quiz, Drupal renders a question with one option, but by default we want to render 2 options for one question. How should I add one set of field collection to another filed collection in form alter or is there any field collection configuration?

My scenario:

  1. Question (textarea)
    1. Option (textarea)

We want it to be:

  1. Question (textarea)
    1. Option (textarea)
    2. Option (textarea)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.