I have a database table with questions for a competition. These are created for specific competitions from an edit page that our staff can use, so each competition may have different questions.
The Questions table has details like the field name, the type (ie checkbox) and the validation type (ie Required and Compare etc).
Is there any way when trying to build the competition view for the customer to dynamically render the questions to the view (as each competition will have different questions)?
I was thinking a dynamic model or something? I am not really sure. Any ideas are welcome.
I am a little confused about how to fit my objects into this model structure. So do I create the editor template for the question of the Answer?
Basically when an admin user set's up a competition they have an entry in the competition table with the basic comp into then they can create a number of Questions which go into the CompetitionQuestion table which is linked back to the Comp table, each comp has any number of questions - this table holds details like the field name, the type (ie checkbox) and the validation type (ie Required and Compare etc) as mentioned above.
But when the competition view is rendered for a person to enter it it pulls info from the Comp Model (which is fine) then I need to loop through the CompetitionQuestion's (don't know how to create model for this) and render out each question for the specific comp - these are then saved when the person enters in the Entry (basic user and comp details) and EntryAnswer (answer to each question) tables.
So do I link the EditorTemplate up to the CompetitionQuestion object or the EntryAnswer object?
Ah so confused right now :(