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