title: Format Amount field with comma and decimal
body: <p>How would I format amount field with comma and decimal?<br/>
  I am able to get commas but this function does not allow decimal in the field.</p>
  
  <pre><code>$('input.number').keyup(function(event) {
  
    // skip for arrow keys
    if(event.which &gt;= 37 &amp;&amp; event.which &lt;= 40){
      event.preventDefault();
    }
  
    $(this).val(function(index, value) {
      return value
        .replace(/\D/g, "")
        .replace(/\B(?=(\d{3})+(?!\d))/g, ",")
      ;
    });
  });
  </code></pre>