please i need help some code for my quiz, my expectation is when the time is running out i want the googleform is automaticly subbmited even if its blank.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<body>
<div id="timer" align="center"><a class="fa fa-book"></a> Psikotest Online <a class="fa fa-clock-o"></a> <span id="time"></span></div>
<span id="form">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSevaFFDGTTEvCV8O04zAB8G4IK-MZIMSWoUzgnWkBFiR_5y_Q/viewform?usp=sf_link">LOADING</iframe><br />
</span>
</body>
<script>
function startTimer(duration, display) {
var timer = duration, minutes, seconds;
var batas = timer + 60*1 ;
setInterval(function () {
minutes = parseInt(timer / 60, 10);
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
display.textContent = minutes + ":" + seconds + " Menit !";
if (--timer < 0) {
document.getElementById("timer").innerHTML = "Waktu Anda Telah Habis, Jika tidak segera submit test secara otomatis pengerjaan anda tidak terekam keseluruhan";
}
if (--batas < 0) {
document.getElementById("form").style.visibility = "hidden";
document.getElementById("timer").style.visibility = "hidden";
}
}, 1000);
}
window.onload = function () {
var fiveMinutes = 60 * 1,
display = document.querySelector('#time');
startTimer(fiveMinutes, display);
};
</script>
<style type="text/css">
body {
overflow: hidden;
}
iframe {
height: 100%;
width: 100%;
border: 0px;
padding-top: 8px;
margin: 0px
}
#timer {
background-color: F0EBE3;
color: 2C3639;
font-family: arial;
font-weight: bold;
padding: 10px 30px;
border-radius: 25px;
}
</style>
please i need help some code for my quiz, my expectation is when the time is running out i want the googleform is automaticly subbmited even if its blank.