2

How can we ensure members renew as the same membership type? At initial sign-up, they can choose their type but after that, renewals should be as the same type - they should not be able to renew as a different type.

One option is to create separate contribution pages for each membership type, then have a join page that links to each of those. And then setup scheduled reminders for each type with links to the contribution page for renewal. With 13 membership types, that's a lot of setup.

So we're looker for a smarter way to do that. Any ideas or useful extensions? Drupal system so webforms are an option.

  • 1
    I hear you - we inherited a project that had a one per membership type contribution page for a professional association - I wrote an extension that loads the current membership and then disables all other membership options - very simple and effective - happy to share the essential bits of that extension with you – KarinG - Semper IT Jun 13 at 2:47
2

With Drupal webforms I am pretty sure you can set the Membership Type to be locked so renewing folk won't be able to change from the one that loads - will only work if they are logged in or using a checksum.

  • I did not know that :-) Cool – KarinG - Semper IT Jun 13 at 2:48
  • "Locked fields" seems to only be a feature of the existing contact itself. But setting membership type to 'user select' and then changing the widget type to 'hidden' seems to have a similar effect. Or did you mean something else Pete? – Aidan Jun 13 at 11:49
  • I meant "changing the widget type to 'hidden'" - if that works I should change the answer – petednz - fuzion Jun 13 at 19:59
0

The key bits are:

function membershipcards_civicrm_buildForm_CRM_Contribute_Form_Contribution_Main(&$form) { 

  $currentMemberships = array_keys($form ->_currentMemberships);
  // Assuming there is only 1 current Membership - display it (first result):
  $currentMembershipID = $currentMemberships[0];
  // price_43 -> is element 24 (_label = Membership)
  // price_42 -> is element 25 (_label = Additional Contribution)
  $elementId_membership = $form->_elementIndex['price_43'];
  $elementId_latefees = $form->_elementIndex['price_42'];

  foreach ($form->_elements[$elementId_membership]->_elements as $key => $oneMembership) {
    if ($oneMembership->_attributes['membership-type'] != $currentMembershipID) {
      unset($form->_elements[$elementId_membership]->_elements[$key]);
    }
  }
...

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.