How to make a Question/Alternatives form?

Hi guys, I have in my DB a questions table and an Alternatives table(with question_id).

I want to create the question already with at least 5 relationed alternatives.


Question Title

Alternative 1

Alternative 2

Alternative 3

Alternative 4

Alternative 5

Like this.

I tried to pass 2 models through the controller but when I var_dump the post I only get the last alternative Post.

The form doesn’t post 5 alternatives.

How can I handle this?


Could you post your problematic code first, please?

Most probably there’s an error in how you try to get all alternatives.