Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Created January 3, 2019 22:07
Show Gist options
  • Save salsalabs/cf53fa8182384a77b92105932bcd406a to your computer and use it in GitHub Desktop.
Save salsalabs/cf53fa8182384a77b92105932bcd406a to your computer and use it in GitHub Desktop.
Remove commas from the "other" amount field.
<!-- BEGIN script to remove commas from the "other" amount field on a donation page. ==>
<script type="text/javascript">
$(document).ready(function() {
var e = $('form[name="subform"]');
if (e.length != 0) {
e.submit(function() {
var v = $('input[name="amountOther"]')
if (v.length != 0) {
v.val(v.val().replace(/,/g, ''));
}
})
}
})
</script>
<!-- END script to remove commas from the "other" amount field on a donation page. ==>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment