diff --git a/www/conservancy/static/supporter-page.js b/www/conservancy/static/supporter-page.js index ca9e4bb08a7afff163b0a8a9a73863df58756ba7..91af8549454323e2b46bb35b582cb3b2934c43d1 100644 --- a/www/conservancy/static/supporter-page.js +++ b/www/conservancy/static/supporter-page.js @@ -46,7 +46,14 @@ $(document).ready(function() { noShippingSelector.val("0"); } }); + + // Forms start in "invalid" form, with the errors shown, so that + // non-Javascript users see the errors by default and know what they must + // enter. The following two lines correct that. $('*#amount').addClass("valid"); + $('.supporter-form-inputs .form-error-show') + .removeClass('form-error-show').addClass('form-error'); + $('*#amount').on('input', function() { var input=$(this); var value = input.val();