Answers.Body: <p>In order to multiply/calculate Amounts based on webform fields, try webform_calculator module: <a href="https://www.drupal.org/project/webform_calculator" rel="nofollow noreferrer">https://www.drupal.org/project/webform_calculator</a></p>
  
  <p>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: <a href="https://github.com/KarinG/webform_calculator" rel="nofollow noreferrer">https://github.com/KarinG/webform_calculator</a></p>
  
  <p><strong>How it works</strong></p>
  
  <p>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.</p>
  
  <p>Here's an example of a Processing Fee (which is a webform civicrm line item):
  <a href="https://i.sstatic.net/la1Nu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/la1Nu.png" alt="enter image description here"></a></p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T09:00:01.323Z
Answers.Text: 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.
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T13:55:52.980Z
Answers.Text: 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?
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T22:10:16.097Z
Answers.Text: 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.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-28T17:09:32.547Z
Answers.LastActivityDate: 2019-12-28T18:01:40.957Z
Answers.LastEditDate: 2019-12-28T18:01:40.957Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>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.</p>
  
  <ol>
  <li><p>By default there is one membership with 2 prices and the field is required</p></li>
  <li><p>Additional memberships have only 1 price and I want to multiply, from 0 to XX extra memberships with a number field.</p></li>
  </ol>
  
  <p>How to do I offer the second possibility?</p>
  
  <p>regards,
  Guillaume</p>
  
  <p><a href="https://cnec.gestad.net/adhesion-CNEC" rel="nofollow noreferrer">Webform's page</a></p>
  
  <p><a href="https://i.sstatic.net/1RKIt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1RKIt.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/OhQJF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OhQJF.png" alt="Membership tab in CiviCRM in Webform"></a></p>
  
  <p><a href="https://i.sstatic.net/OvQ1a.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OvQ1a.png" alt="Contribution tab in CiviCRM in Webform"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-24T15:09:07.593Z
Comments.Text: Hi Guillaume - please post some screenshots of your config (components) and your form (view)
Comments.UserDisplayName: KarinG - Semper IT
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-24T15:37:04.883Z
Comments.Text: Sorry I've edited my post.
Comments.UserDisplayName: Guillaume Sorel
Tags: <webform-civicrm>
Title: Webform with multiple of the same membership
ThreadText: # Webform with multiple of the same membership
  
  (Asked by: username_0 on 2019-12-24)
  
  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](https://cnec.gestad.net/adhesion-CNEC)
  
  [![enter image description here](https://i.sstatic.net/1RKIt.png)](https://i.sstatic.net/1RKIt.png)
  
  [![Membership tab in CiviCRM in Webform](https://i.sstatic.net/OhQJF.png)](https://i.sstatic.net/OhQJF.png)
  
  [![Contribution tab in CiviCRM in Webform](https://i.sstatic.net/OvQ1a.png)](https://i.sstatic.net/OvQ1a.png)
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_1**: Hi Guillaume - please post some screenshots of your config (components) and your form (view)  
  > **username_0**: Sorry I've edited my post.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-28. Score: 2 | Accepted answer
  
  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](https://i.sstatic.net/la1Nu.png)](https://i.sstatic.net/la1Nu.png)
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_0**: 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?  
  > **username_1**: 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.  
  
  ---
  
  