1

I'm using webform 4.21 on Drupal 7.67 and CiviCRM 5.19.3 and I need to allow somebody to get a membership for multiple organizations.

  1. By default there is one membership with 2 prices and the field is required

  2. Additional memberships have only 1 price and I want to multiply, from 0 to XX extra memberships with a number field.

How to do I offer the second possibility?

regards, Guillaume

Webform's page

enter image description here

Membership tab in CiviCRM in Webform

Contribution tab in CiviCRM in Webform

2
  • Hi Guillaume - please post some screenshots of your config (components) and your form (view) Commented Dec 24, 2019 at 15:09
  • Sorry I've edited my post. Commented Dec 24, 2019 at 15:37

1 Answer 1

2

In order to multiply/calculate Amounts based on webform fields, try webform_calculator module: https://www.drupal.org/project/webform_calculator

We've made some edits to support amounts being calculated over multiple pages - you can find what we're currently using for our projects here: https://github.com/KarinG/webform_calculator

How it works

The module adds a Formula webform component. So you can then configure a CiviCRM Contribution Amount or Membership Fee field to become a field of type Formula and specify the calculation with components.

Here's an example of a Processing Fee (which is a webform civicrm line item): enter image description here

PS - I'm a bit confused though why you would want to buy multiple Memberships of the same type (in CiviCRM that would just mean multiple terms of one Membership Type) - but if you're looking to do Math the answer I've posted here using our latest webform_calculator module is the way to go.

3
  • Hi Karin! Thanks for your answer. I used in the meanwhile Webform calculation component module and apparently it does the job. I will try your solution in case of issues. Commented Jan 6, 2020 at 9:00
  • Hi Karin! I tried your improvement of the webform_calculator and it's awesome! Exactly what I was looking for. Could it be possible that it doesn't support multipage? Commented Apr 21, 2020 at 13:55
  • Hi - it should support multipage - open another SE issue with details/specifics and I'll try and see if I can screenshot you an example there. Commented Apr 21, 2020 at 22:10

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.