How do I create a Donate button with a text field?
In some cases donation collectors may be legally obliged to obtain information about their donors, such as name, address, employer and occupation. The PayPal Donation Button can be set up to collect this data automatically, and it will be included in your payment confirmation emails. As the "employer" and "occupation" elements (or any other custom data), aren't collected by PayPal by default, the user needs to set up a couple of text boxes to gather this information.
Because the button designer tool does allow interactive elements for Donation buttons, it needs to be done through a different flow. Here's how:
- Log in to your PayPal account.
- Select Tools > PayPal buttons.
- Click Select button for preferred button type.
- Select the Button type Buy Now (we'll be altering this to Donation in later steps).
- Enter the name of the organization, fund, or campaign being donated to (such as "John Doe for President Campaign Fund") In the Item name field.
- Leave the Price field blank.
- Click Add text field in the Customize button section. (If you want a drop-down menu here instead of a text field, that's fine; click Add drop-down menu instead).
- Enter the name of the piece of information you want to collect in the Enter name of text field. For instance, if you want to collect the buyer's employer, enter "Employer."
- Click Done. The Your customer's view section should show the new text field.
- If you want to add a second text field, click Add another text field, then repeat Steps 6 and 7.
- Near the bottom of the page, click Step 2: Track inventory, profit & loss.
- Uncheck the Save button at PayPal checkbox.
- At the bottom of the page, click Create Button.
- The HTML code for your button will display in a box in the center of the page. Click Remove code protection.
- Copy the code to your favorite text editor, such as Notepad.
- In the code, find "_xclick" and change it to "_donations."
- Find btn_buynowCC_LG.gif and change it to btn_donateCC_LG.gif.
Note 1: If you prefer a version of the button that doesn't have credit card logos, use btn_donate_LG.gif instead.
Note 2: btn_buynowCC_LG.gif shows up twice in the code.
- Copy the modified code to your website.