Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Need suggestion auto submit google form when timeout

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!