I have a page on my site that is setup for recurring payments, but I want to disable the PayPal checkout buttons until someone has checked the box that agrees to my Terms Of Service. Can you help me figure out how to do this properly?
THANKS!!!!! -Brad
I'm not gonna give you a full answer written in code because I don't know the elements or variable names in your code. Also it's better to write your own and learn.
Use jquery to add a .toggle() function on the checkbox item. You can select the checkbox item via its id (or class if you wish).
You can create a div called 'paypal' and place the paypal button inside it. Then,
Something like:
Hope this helps.
It wont work, PAYPAL button is a tag, so Disabling it is not like disabling any DIV or BUTTON; Im trying to figure it out to but not found yet.
I know this is an old thread but thought Id post the what I did. Simply, all you need to do is give the button an id and set to disabled, use java to enable the button on checkbox checked, apply the code to the checkbox onclick="UnlockButton()". That worked for me.
I know this answer is late, but I thought I would still post it just in case someone can use it. You cannot "disable" the Paypal button because it's being rendered by Paypal. Although I'm open to being proved wrong about that. Instead I've figured out a method which basiclly does the same thing—it keeps the user from being able to click the contents of the div, and from accessing it via the 'tab' key.
Here's the JSfiddle: Disable Paypal Button