Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1480

CiviMember - put date ranges in Global Settings

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.6
    • Component/s: CiviMember
    • Labels:
      None

      Description

      The Membership form allows the user to choose from a range of input years. For organisations that have long standing members it is necessary to edit the Membership.php file to change the number of years available. While this is easy to achieve it would be good if this was configurable in global settings rather than having to edit the file on each update.

      Specifically this would mean having an upper and lower range limit for join_date, start_date and end_date.

      You can modify the years supported in the New Membership form by changing this line in :
      CRM/Member/Form/Membership.php
      $this->add('date', 'join_date', ts('Join Date'),
      CRM_Core_SelectValues::date('manual', 3, 1), false );
      $this->addRule('join_date', ts('Select a valid date.'), 'qfDate');
      $this->add('date', 'start_date', ts('Start Date'),
      CRM_Core_SelectValues::date('manual', 3, 1), false );
      $this->addRule('start_date', ts('Select a valid date.'), 'qfDate');
      $this->add('date', 'end_date', ts('End Date'),
      CRM_Core_SelectValues::date('manual', 3, 1), false );
      $this->addRule('end_date', ts('Select a valid date.'), 'qfDate');

      Change the parameter that is currently "3" to "20" - this will give you current year through 20 years ago on the form.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              speleo Henry Bennett
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: