HTML input field that will post a whole number but display with commas : <p>I need an input field that matches the following criteria, I have looked at input masks but can't seem to find one that fits my needs! Any pointers would be much appreciated!</p>

<p>The field is for submitting a currency in whole numbers. I would like commas added in as the user is typing (or for it to accept properly placed commas) eg. 1,000,000, 1,000 etc.</p>

<p>It also needs to either not allow decimal places or automatically add .00 to the end.</p>

<p>Then when the PHP form is posted it needs to post only the whole number (or with the .00 on the end is fine!).</p>

<p>Does anybody have an idea how I could achieve this? Live validation would be best rather than waiting until submit. :)</p>

<p>There is server checks for the correct format so don't need to worry much about somebody without JS submitting bad input.</p>

<p>I have tried HTML5 number input with step as 1 but this still allows me to type decimals in and will even submit. I assume this is just for the arrows!</p>
