CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Monthly Contributions
Pages: [1]

Author Topic: Monthly Contributions  (Read 364 times)

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Monthly Contributions
August 24, 2012, 04:20:45 am
Is it possible to set up a contribution page with two prices options that are monthly contributions? I know we can select the recurring contribution option, but we do not want to give that as a choice we want to be able to say 20 a month, 40 a month and have it default to the recurring option. I have a custom template, but I don't know if this can be modified there?

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Monthly Contributions
August 24, 2012, 04:31:59 am
Can I maybe update this area on the tpl file? How can I set the $form.is_recur to default to true?

if ( {/literal}"{$form.is_recur}"{literal} ) {
    if ( document.getElementsByName("is_recur")[0].checked == true ) {
  window.onload = function() {
      enablePeriod();
  }
    }
}
function enablePeriod ( ) {
    var frqInt  = {/literal}"{$form.frequency_interval}"{literal};
    if ( document.getElementsByName("is_recur")[0].checked == true ) {
  document.getElementById('installments').value = '';
  if ( frqInt ) {
      document.getElementById('frequency_interval').value    = '';
      document.getElementById('frequency_interval').disabled = true;
  }
  document.getElementById('installments').disabled   = true;
  document.getElementById('frequency_unit').disabled = true;

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Monthly Contributions

This forum was archived on 2017-11-26.