Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.

Lionsanime Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-23-2008, 07:30 PM   #1 (permalink)
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  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 01-24-2008, 01:12 AM   #2 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 424
iTrader: 0 / 0%
Latest Blog:
None

Boogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the rough
You need a script or some code-behind? What technology are you using to create the site? ASP/PHP etc? If neither and it's just a plain HTML site then you would to use javascript or AJAX or just use two separate buttons. if you're using ASP let me know and i'll post the code for you,

Boog's
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-24-2008, 04:31 AM   #3 (permalink)
Junior Member
 
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

brokenshadows is liked by many
sorry...I knew I was forgetting something

i'm using js...too little sleep...i forgot that there needs to be some code to tell the form what to do
brokenshadows is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-28-2008, 06:50 PM   #4 (permalink)
v7n Mentor
 
digiweb's Avatar
 
Join Date: 04-07-06
Location: Manchester, NH
Posts: 762
iTrader: 1 / 100%
digiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of light
Send a message via Yahoo to digiweb Send a message via Skype™ to digiweb
PHP Code:
<?php 
if ($_POST['payment'] == 'Pay now via Paypal - $25.00') {
    
header("Location: paypalbuttonpage.php");
} else {
    
header("Location: thankyoupage.php");
}
?>
digiweb is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-29-2008, 05:11 AM   #5 (permalink)
Junior Member
 
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

brokenshadows is liked by many
thanks digi...I'll try that
brokenshadows is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form button half working gridsix Web Design Lobby 2 03-08-2008 09:06 PM
Do you use the vBulletin "multi-quote" function? Avinash Forum Lobby 2 11-11-2006 06:39 AM
Need Help: Form submit and IE Back button problem !!! cuongdm Coding Forum 4 10-27-2006 10:53 AM
Make a button or image enter something into a form? Leader of Men Coding Forum 2 11-13-2003 06:25 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:46 PM.
© Copyright 2008 V7 Inc