Thanks for the extra research Chris! You are indeed correct. This is part of Chrome's support for the HTML5 number field and by disabling the "Output HTML5" option on the settings page ( here: http://grab.by/8rBn ) it will remove the number increment toggle.
However, if you like the increment toggle and just want to avoid the weird numbers, you can use a simple bit of jQuery to set the min and max attributes for this field which will force the field to only increment between those two numbers.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#input_5_2').attr('min', 0).attr('max', 340);
});
</script>
This example already has the number field from your form targeted, so it is just a matter of either pasting this script block in your header.php OR adding just the javacript in between the two script tags to a javascript file that is already being loaded by your theme (usually init.js or something similar).
Posted 13 years ago on Tuesday January 18, 2011 |
Permalink