This project is not covered by Drupal’s security advisory policy.

Webform Discount provides the ability to create Discount Codes that can be applied to alter the value of number fields in Webform submissions. It is intended to create a Discount code like feature for submissions. This works well with a module like Stripe Webform.

Discount codes are created as their own entity type. When an enabled webform is submitted, a handler will query any active discount codes and apply a mathematical operation to a target value within the webform. You can deduct a fixed value, or a percentage from any target field.

Instructions

In the form builder interface, navigate to Settings > Emails / Handlers

Click, "Add Handler"

In the handler settings, add a name, discount code element, and target element. These should be existing elements in your webform.

Note, if you are using something like Stripe Webform, you will want to be sure that this module's handler is placed before the Stripe Handler (and any other handlers or emails that expect to use the modified value) to ensure that it will always run first.

Supporting organizations: 
Funding and Development
Development

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • Ecosystem: Webform
  • Created by bburg on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases