You can easily create a custom PayPal button or donation button with custom user input fields using just HTML. In this example we will make a donation button.
First lets look at a basic HTML markup for a PayPal button:
Next we will modify this markup for our own use.
Change ‘cmd’ field:
Right now the ‘cmd’ field value variable is set to ‘_cart’, which defines our button as an ‘add to cart’ button. Change the ‘cmd’ variable to ‘_donations’.
Change the ‘business’ field:
Replace the ‘business’ field value with your PayPal account email address.
Change the ‘item_name’ field:
Change the item name field value to ‘my website donation’.
Change the ‘amount’ field:
Now let’s change the ‘amount’ field so that the person donating can specify the donation amount, a label and make the field required.
Specify return page:
Lets add a return variable that specifies the thank you page we want the user to return to after making the donation. Replace the google url with your own.
Add a custom field radio button:
Let’s create a custom radio button field where the person donating gets to opt in to receive a free coupon.
Add a note field:
This field lets the user add a note to his donation.
Change ‘image’ field:
Right now the button for our form would appear as a ‘Buy’ button, let’s change it to a ‘Donation’ button. Change the ‘btn_buynow_LG’ text in the ‘src’ field variable to ‘btn_donate_LG’.
You can add more custom input fields this way. For a list of more PayPal variables to modify go here.