1

Obviously, I want to provide the option for recurring but I do not want it to load the page with default recurring selected. I think this is the way most administrators would want it to work. Should be simple, right?

1

Actually in the iATS Extension we've gone back and forth on this but are now "is.checked" as many orgs/administrators make special "Donate monthly now" pages with specific appropriate defaults for monthly $amounts like $25 or $50 - typically less than the default on a "Donate one time" page. On a Donate monthly to get people through without extra checking of boxes - the default is now is.checked (if recurring is an option). To uncheck that box you need to add some Javascript.

This is what you want:

$('#is_recur').attr('checked', false);

There are several ways to go about adding this [and not sure this is the best one - but it's one that I understand, it's what I typically do] - on Drupal 7:

In the theme's template.php - when preprocessing a page - I'll insert js - based on path:

enter image description here

So if we're on a civicrm/event/transact url -> then load civicrm-recurring.js

and that civicrm-recurring.js file lives in the theme's js directory and looks like:

enter image description here

  • Sorry so late to respond, Karin! Thank you! Unfortunately, I do not know how to code this or where to put it precisely. Can you give me a code snippet and instructions about where to place it (a file path). – John Richardson Sep 1 '17 at 22:19
  • Hi John! I've added details above. Give that a try - and let me know if you have any further questions; – KarinG - Semper IT Sep 2 '17 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.