I want the user to be able to type a Discount code into a field and then I want that Discount code (if applied correctly) to result in a reduction of their Membership Fees;
2 Answers
This is easy to configure with webform civicrm (a Drupal module) - here are the steps:
A. Create a native webform field - call it Discount Code. Let's put it at the top - where we're going to select the Membership Type:
B. Go to your CiviCRM Tab -> then to Memberships -> and hit the checkbox on Membership Fee; this will expose it to the webform;
C. String it together with Conditionals: in your Webform Tab -> hit Conditionals Here's mine:
D. Let's test the Form: here are the three scenarios:
Select Professional Membership - we don't have a Discount Code:
Select Student Membership - we don't have a Discount Code:
Select Student Membership - and we have a Discount Code:
-
Thoughts on using this to reduce the cost to a 'free' ($0) registration? I've tried it with conditionals, which does zero the fee, however I run into an issue when the webform is still wanting credit card info entered to complete the registration.– jursulakCommented Apr 9, 2018 at 16:56
-
Hey Jason - email me the form url and I’ll have a look Commented Apr 9, 2018 at 17:39
-
Thanks Karin. This actually makes CiviDiscount useless :-) Commented Jan 9, 2020 at 17:19
-
Combine this with webform_calculator module and you’ll be flying :-) PS if you do - we have an improved version of it that does math over multiple forms. Ping me if you’re interested. Commented Jan 10, 2020 at 0:24
Consider using the suggestion below from KarinG to manage a larger list of Discount codes effectively.
-
1HI Zachary -> if you are on D9 you can use Computed TWIG fields. I've added an example to your Answer (because I can't include an image in a comment). Commented Apr 11, 2023 at 0:15
-
1Zach - as your post is not an Answer it will get deleted at some point. Please either ensure you post your 'question' as a comment or as a new question. or since i see karin helpfully added images as an answer, reword your 'question' so it becomes an Answer :-)– petednz - fuzion ♦Commented Apr 11, 2023 at 4:27
-