hi,
i wonder how to preselect a radio button on quiz page?
i am using quiz-1.html template for quiz page on my project. i want to render the radio buttons in a way that if an answer was already selected, it should be preselected at the time of rendering. and i figure that to render this, i must add class "active" in the
@foreach (var answer in Model.currentQuestion.Answers)
{
string cls = "";
if (answer.isSubmitted)
{
cls = "active";
}
@answer.Description
}
please guide me how to make a radio button pre-selected?