Frage

I am creating a new website for a non-profit organization, and would like to have a donation form in which the donor can enter the amount they would like to give, and then have that value carried over to PayPal.

Here is the website.

If you click on "give online", a modal appears with the Donation form.

Here is the form's code: (It is taken from the website's contact form in order to keep all forms visually similar.)

<!-- form -->
    <form id="contactForm" action="#" method="post">
    <fieldset>

    <p><label for="amount">Enter the amount you wish to donate.</label> 
    <input name="amount" id="amount" type="text" value="" class="form-poshytip" title="USD"></p>

    <p><input type="button" value="Continue"></p>

    </fieldset>
    </form>
<!-- ENDS form -->

The continue button does not do anything, yet. It would like it to direct the donor to the PayPal page where the amount they just entered in the donation form would be present.

Code that directs the donor to PayPal is missing, mainly because I am not very advanced-code savvy. Help is very much appreciated.

War es hilfreich?

Lösung

Here is a sample Donation button code you can use:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="email address">
<input type="hidden" name="item_name" vale="Donation"> 
<input name="amount" id="amount" type="text" value="" class="form-poshytip" title="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>

I grabbed the amountline from your code and added it to mine. I didn't use the "Continue" button on your sample. I put in the actual Donation button image.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top