This commit is contained in:
2019-07-07 23:19:44 +02:00
parent 9c1052e392
commit 8b1dae7c79

View File

@@ -25,7 +25,13 @@ echo <<<END
<div class="form-box"> <div class="form-box">
END; END;
echo('<input class="form-solution" type="radio" name="solution" value="0" required' . (($sol == 0) ? 'checked' : '') . '>'); if ($sol == 0) {
//checked
echo('<input class="form-solution" type="radio" name="solution" value="0" required checked >');
} else {
//unchecked
echo('<input class="form-solution" type="radio" name="solution" value="0" required >');
}
echo <<<END echo <<<END
<input class="form-answer" type="text" name="answer0" id="answer0" required value="$an0"> <input class="form-answer" type="text" name="answer0" id="answer0" required value="$an0">
@@ -34,7 +40,14 @@ echo <<<END
<label for="answer1">Antwort 1:</label> <label for="answer1">Antwort 1:</label>
<div class="form-box"> <div class="form-box">
END; END;
echo('<input class="form-solution" type="radio" name="solution" value="1" required' . (($sol == 1) ? 'checked' : '') . '>');
if ($sol == 0) {
//checked
echo('<input class="form-solution" type="radio" name="solution" value="1" required checked >');
} else {
//unchecked
echo('<input class="form-solution" type="radio" name="solution" value="1" required >');
}
echo <<<END echo <<<END
<input class="form-answer"type="text" name="answer1" id="answer1" value="$an1"> <input class="form-answer"type="text" name="answer1" id="answer1" value="$an1">
@@ -43,7 +56,14 @@ echo <<<END
<label for="answer2">Antwort 2:</label> <label for="answer2">Antwort 2:</label>
<div class="form-box"> <div class="form-box">
END; END;
echo('<input class="form-solution" type="radio" name="solution" value="2" required' . (($sol == 2) ? 'checked' : '') . '>');
if ($sol == 0) {
//checked
echo('<input class="form-solution" type="radio" name="solution" value="2" required checked >');
} else {
//unchecked
echo('<input class="form-solution" type="radio" name="solution" value="2" required >');
}
echo <<<END echo <<<END
<input class="form-answer" type="text" name="answer2" id="answer2" value="$an2"> <input class="form-answer" type="text" name="answer2" id="answer2" value="$an2">