View Single Post
Old 01-23-2008, 07:30 PM   #1 (permalink)
brokenshadows
Junior Member
 
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

brokenshadows is liked by many
Multi-Function Form Submit Button

I've been working on a form for a registration page that will accept PayPal, and I've a couple of questions...all of which will probably have obvious answers that I'm missing...

1) I need the submit to do one of two things. If the user selects the "Pay Now" option from a drop-down selection, it needs to act like the standard PayPal button (sending them to the PayPal website so they can make their payment). If they select the "Pay Later" option, it needs to NOT take them to PayPal and instead take them directly to the "Thank You" page.

2) I need the contents of the completed form to be sent to an e-mail address. This one I am pretty sure I can figure out, I'm just irritated with the Submit button right now.

Here's the code I'm working with:
Quote:
<form id="form1" name="form1" method="post" action="">
<p><span id="lastname">
<label>Last Name
<input type="text" name="lastname" id="lastname" />
</label>
</span></p>
<p><span id="firstname">
<label>First Name
<input type="text" name="firstname" id="firstname" />
</label>
</span></p>
<p><span id="address">
<label>Street Address
<input type="text" name="address" id="address" />
</label>
</span></p>
<p><span id="city">
<label>City
<input type="text" name="city" id="city" />
</label>
</span></p>
<p><span id="state">
<label>State
<input type="text" name="state" id="state" />
</label>
</span></p>
<p><span id="zip">
<label>Zip Code
<input type="text" name="zip" id="zip" />
</label>
</span></p>
<p><span id="phone">
<label>Phone Number
<input type="text" name="phone" id="phone" />
</label>
</span></p>
<p>
<label>E-Mail Address
<input name="email" type="text" id="email" />
</label>
</p>
<p>
<label>Web Site
<input type="text" name="website" id="website" />
</label>
</p>
<p><span id="team">
<label>Prefered Team
<select name="team" id="team">
<option selected="selected">USA Special Forces</option>
<option>Columbian Government</option>
<option>Columbian Drug Cartel</option>
<option>I just want to shoot someone!</option>
</select>
</label>
</span></p>
<p><span id="payment">
<label>Payment Options
<select name="payment" id="payment">
<option selected="selected">Pay now via Paypal - $25.00</option>
<option>Pay at the field - $35.00</option>
</select>
</label>
</span></p>
<p>
<label>Comments, Special Equipment, or Special Needs<br />
<br />
<textarea name="comments" id="comments" cols="70" rows="5"></textarea>
</label>
</p>
<p><input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
<input type="hidden" name="business" value="oldawg860@yahoo.com" />
<input type="hidden" name="item_name" value="Clear and Present Danger PrePay" />
<input type="hidden" name="amount" value="25.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="shipping" value="0.00" />
<input type="hidden" name="shipping2" value="0.00" />
<input type="hidden" name="handling" value="0.00" />
<input type="hidden" name="return" value="http://www.wolfcreekpaintball.com/pages/thankyou.htm" />
<input type="hidden" name="cancel_return" value="http://www.wolfcreekpaintball.com/pages/CaPDReg.htm" />
<input type="hidden" name="undefined_quantity" value="0" />
<input type="hidden" name="receiver_email" value="oldawg860@yahoo.com" />
<input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
<input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="no_note" value="0" />
<input type="image" name="submit" src="http://www.wolfcreekpaintball.com/images/button_submit.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!" />
</p>
</form>
brokenshadows is offline   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links