radios at least
parent
b3c18b56ed
commit
2dda72cfa3
|
|
@ -21,7 +21,7 @@
|
|||
<h1><span id="question-text"></span></h1>
|
||||
</div>
|
||||
<form id="answer-form" action="#" onsubmit="submitAnswersForm(this); return false;">
|
||||
<ul id="question-options"></ul>
|
||||
<div id="question-options"></div>
|
||||
<input id="answers-freeform" type="text" hidden/>
|
||||
</form>
|
||||
</body>
|
||||
|
|
@ -49,9 +49,15 @@
|
|||
if (g_live_question) {
|
||||
let options = "";
|
||||
for (let i of g_live_question.Options)
|
||||
options += `<li>${i}</li>`;
|
||||
document.getElementById("question-text").innerHTML = g_live_question.Text;
|
||||
document.getElementById("question-options").innerHTML = options;
|
||||
options += `<div>
|
||||
<input type="radio" value="${i}" name="g_live_question.Options" />
|
||||
<label for="${i}">${i}</label>
|
||||
</div>`
|
||||
options = `<fieldset>${options}</fieldset>`;
|
||||
if (document.getElementById("question-text").innerHTML != g_live_question.Text) {
|
||||
document.getElementById("question-text").innerHTML = g_live_question.Text;
|
||||
document.getElementById("question-options").innerHTML = options;
|
||||
}
|
||||
} else {
|
||||
document.getElementById("question-text").innerHTML = "";
|
||||
document.getElementById("question-options").innerHTML = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue