Title: Coupon Codes
Last modified: September 3, 2016

---

# Coupon Codes

 *  [GC](https://wordpress.org/support/users/griffcon/)
 * (@griffcon)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/coupon-codes-6/)
 * I am trying to add a coupon code with a “#” sign in the beginning of it and it
   is not accepting it. Is this a bug in the code?

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/coupon-codes-6/#post-8010928)
 * Hi,
 * I’ve detected the cause of issue, and I’m working in the update, however, you
   can solve it in your copy of the plugin following the steps below:
 * 1. Open the “/wp-content/plugins/calculated-fields-form/cp_calculatedfieldsf_admin_int.
   php” file with the text editor your choice.
 * 2. Go to the snippet of code:
 * `var params = '&cff_add_coupon=1&cff_coupon_expires='+encodeURI(expires)+'&cff_discount
   ='+encodeURI(discount)+'&cff_discounttype='+encodeURI(discounttype)+'&cff_coupon_code
   ='+encodeURI(code);`
 * and replace it by the following one:
 * `var params = '&cff_add_coupon=1&cff_coupon_expires='+encodeURIComponent(expires)
   +'&cff_discount='+encodeURIComponent(discount)+'&cff_discounttype='+encodeURIComponent(
   discounttype)+'&cff_coupon_code='+encodeURIComponent(code);`
 * Pay attention, I’ve replaced the functions “encodeURI” by “encodeURIComponent”
 * and that’s all.
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Coupon Codes’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/coupon-codes-6/#post-8010928)