Skip to content

Add attribute discount-applied=1 to discountcode textfield when discount is applied and valid

mattwire requested to merge github/fork/mjwconsult/cividiscountappliedattr into master

Currently there is no way to detect (on the form via javascript) that a discount code is valid and has been applied.

The adds an attribute to the discount text field - "discount-applied=1" which can then be used by (eg. Stripe - stripe!157 (merged)) to detect whether the code needs to be applied before submitting.

Merge request reports