Hi there,
While this isn’t something that’s available with Give out of the box, this is something that could be achieved through custom development.
Here is a jQuery code snippet that we’ve used to mark other checkboxes as checked by default as a great place to start:
https://github.com/impress-org/give-snippet-library/blob/master/add-on-snippets/tributes/default-tributes-to-yes.php
I’ve made some tweaks to it as an example that should get you what you’re after:
/**
* Default the anonymous selection to "checked"
*
*/
function my_give_anonymous_by_default()
{ ?>
<script>
jQuery("input[name=give_anonymous_donation][value='1']").prop("checked", true);
</script>
<?php }
add_action('give_donation_form_after_submit', 'my_give_anonymous_by_default');
We strongly recommend you try this first in a staging or local development environment to ensure compatibility.
Please note that this code snippet is provided as an example of how you can extend Give with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.
Have a great rest of your day.
-
This reply was modified 6 years, 10 months ago by
gsamsmith.
Hi there,
I’m going to mark this ticket as resolved, but if there is anything else you need don’t hesitate to reach out.
Thanks.