title: Show the Value on form real time - app script
body: <p>i need help on the web app form. im faceing issue how to show the value real time on webapp form. i right code.gs but im unbale to create javascript for run the function interval level.</p>
  <p>please help me on this.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function getTime(){
      
    const ss =SpreadsheetApp.getActiveSpreadsheet()
        const wsData = ss.getSheetByName("Run")
        const emp = [Session.getActiveUser().getEmail()];
        const now = new Date();
        const d= wsData.getDataRange().getDisplayValues().reverse();
        const emp_i = d.findIndex(r =&gt; r[1] === emp.toString());
        if (emp_i == -1 &amp;&amp; d[emp_i][4] == "");
        const hour = new Date(now - new Date(d[emp_i][3])).toISOString().substr(11,8 );
        return hour;
  }
  
  var Duration = [getTime()];</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label for="Duration"&gt;Last Activity Duration&lt;/label&gt;
              &lt;select class="w3-select"  id="Duration"&gt;
                 
                  &lt;? for(let i=0;i&lt;Duration.length;i++){ ?&gt;
                  &lt;option&gt;
                      &lt;?= Duration[i]; ?&gt;
                  &lt;/option&gt;
                  &lt;? }?&gt;
              &lt;/select&gt;
          &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>