We want to have a customized subscription form, that includes a coupon code input

230 views Asked by At

As I understand it - I cannot use Recurly.js v3 for this... the hosted pages are not very pretty - so we want to style our own, however it seems like the coupon code field is not supported - and its very necessary for our business model.

Am I missing something?

2

There are 2 answers

0
drewish On

It's definitely supported. Just add an input and use the data-recurly="coupon" attribute:

<input type="text" data-recurly="coupon">

You can see it in the pricing section of the R.JS docs.

0
ScareCrow On

I have integrated this into my application in few weeks ago. You can add the following to your page for the coupon code field.

<input type="text" name="couponcode" placeholder="Coupon Code" data-recurly="coupon_code" >

You can get the value by input field name name="couponcode". Following is the PHP code.

'coupon-code'   => sanitize_text_field($_POST['couponcode'])