I want people to be able to sign up for a membership using a contribution form. The membership lasts until the person turns 14. We collect the birthdate information in a profile on the contribution form.

How can I set the membership end date to be calculated from the birth date?

We are using CiviCRM 4.7 and Drupal 7

1 Answer 1


We created an extension that added this functionality.

Edit: Unfortunately the extension is not publicly available as it is mixed in with a whole collection of custom stuff we needed to do for this client. Also our requirements changed so we were no longer working off birth date but still setting the end date based on a field completed whilst completing the form.

I am not the coder but as far as I can understand we created a function to set end date to the value we then calculated from the field of interest.

  • 1
    Could you say a bit more about your extension to help anyone else facing a similar issue? Is your code publicly available?
    – Aidan
    Jun 5, 2017 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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