Set a default giving level on a NetCommunity donation form

If you have a form with just one amount specified then we can make this the default fairly easily: a simple bit of JavaScript will do it for 98%+ of people.

Put this in an unformatted text part below the form:

<script type="text/javascript">
$('.DonationFormTable input[type=radio]:first').click();
</script>

Try copy and paste and hopefully it should work!

Multiple amounts

If you have four giving amounts listed it us possible to have it select a specific option using the code below. For example, $25, $50, $75, and $100 with a page where $75 is auto-selected.

<script type="text/javascript">
$(document).ready(function() {
    $('.DonationFieldControlCell span:contains("75"):first').closest('tr').find('input[type=radio]').click();
});
</script>