title: Javascript to hide value if it's zero
body: <p>I have a form who gives data from database
  I have number type inputs.
  I want to hide and leave empty the input that displays "0", without replace it in database after submit.</p>
  
  <p>I found how to do it with table cells.
  But not with inputs.
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;script type="text/javascript"&gt;
  var table = document.getElementById("myTable");
  var cells = table.getElementsByTagName("td");
  for (var i = 0; i &lt; cells.length; i++) {
    if (parseInt(cells[i].textContent, 10) === 0) {
   cells[i].innerHTML = ' ';
  
    }
  }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thx.</p>