Normally, when a visitor clicks the Cancel button from the membership application form, they are returned to your Wild Apricot site's homepage. If you want to direct them to a different location, follow these steps.
- Within the Website module, click the Settings option at the top of the screen then choose the Global JavaScript option (under Site settings).
- Copy and paste the following code:
<script>
$('.WaGadgetMembershipApplication .navigationContainer
input[type=button][value=Cancel]').click(function(){
Page_ValidationActive = false;
location.href = "redirect_page_url";
});
</script> - Change redirect_page_url to the complete URL of the page you want to direct them to when they click Cancel.
For example:<script>
$('.WaGadgetMembershipApplication .navigationContainer
input[type=button][value=Cancel]').click(function(){
Page_ValidationActive = false;
location.href = "https://stevelivetestsite.wildapricot.org/events";
});
</script> - Click Save.