Custom HTML Form Problem

LutonAC
Contributor
Contributor

I dont know if anyone can help but I am having some problems with custom html forms that I use on a site.  Sometimes I get all the information come through from all the fields on the form but more increasingly it stops after the first field ie.Full Name.  I have tested  the form on sandbox and all the information comes through everytime.

 

Here is form I use

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OAP Renew Full Year Membership</title>
</head>
<body style="background-color:silver;">
<!-- Start of Buy Now Form -->
<div style="margin-left: 100px;">
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
  <input type="hidden" name="cpp_header_image" value="https://yourwebsite.com/logo.jpg">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="hosted_button_id" value="xxxxxxx">
 
  <!-- Replace value with the web page you want the customer to return to after a successful transaction -->
  <input type="hidden" name="return" value="http:/xxxxx/thankyou.htm">
  <!-- Replace value with the web page you want the customer to return to after item cancellation -->
  <input type="hidden" name="cancel_return" value="http://xxxxxxx/cancelled.htm">
  <!-- -->
  <div style="text-align: center;text-decoration: underline">
  <b>OAP RENEW FULL YEAR MEMBERSHIP</b><br />
  (Please fill out <b>ALL</b> of your details otherwise your application <b>WILL</b> be delayed.)</div>
  <br><br>
  <p>
  Full Name and Current Membership Number<br />
  <input type="hidden" name="on1" value="Full Name">
  <input type="text" name="os1" size="64">
  <br><br>
  Date Of Birth:<br />
  <input type="hidden" name="on2" value="DOB">
  <input type="text" name="os2" size="32">
  <br><br>
  Address 1: (House Number/Name and Street Name) <br />
  <input type="hidden" name="on3" value="Address1">
  <input type="text" name="os3" size="32">
  <br><br>
  Address 2: (Town,County and Postcode)<br />
  <input type="hidden" name="on4" value="Address2">
  <input type="text" name="os4" size="32">
  <br><br>
  Contact Number:<br />
  <input type="hidden" name="on5" value="Contact">
  <input type="text" name="os5" size="15">
  <br><br>
  (If an Official Club Representative is submitting this form please enter their name here.)<br />
  Representative Name:<br />
  <input type="hidden" name="on6" value="Rep Name">
  <input type="text" name="os6" size="32">
  <br />
</p>
<p>
    OAP Renew, No Key £32.00 GBP<br />
    OAP Renew + Key £37.00 GBP<br />
    OAP renew, No Key + 3rd Rod £50.00 GBP<br />
    OAP Renew + Key + 3rd Rod £55.00 GBP<br />
</p>
<table>
<tr><td><input type="hidden" name="on0" value="OAP Renew">Please Choose An Option</td></tr><tr><td><select name="os0">
    <option value="OAP Renew, No Key">OAP Renew, No Key £32.00 GBP</option>
    <option value="OAP Renew + Key">OAP Renew + Key £37.00 GBP</option>
    <option value="OAP renew, No Key + 3rd Rod">OAP renew, No Key + 3rd Rod £50.00 GBP</option>
    <option value="OAP Renew + Key + 3rd Rod">OAP Renew + Key + 3rd Rod £55.00 GBP</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="GBP">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
<!-- -->
</form>
</div>
</body>
</html>

 Any help for this problem will be VERY gratefully received as at this point I am pulling my hair out.

 

 

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

LutonAC
Contributor
Contributor

Thanks for the info will definitely be giving this a go.

View solution in original post

Login to Me Too
2 REPLIES 2

snowshoe
Frequent Advisor
Frequent Advisor

Just a brief look at your form.

 

Looks like you created your item button using the online button creator, after that, you manually added some additional option variables.  If that's the case, it won't work because the code is "hosted" on the PayPal Servers. 

 

The online button creator has it's limitations when it comes to the number of text input fields - if you try to modifiy the code after it's been generated and saved as "hosted", the additional fields you added are just ignored or could cause the code to fail.

 

Basically you need to start over and manually code your form.

 

To provide you with some ideas, see the example below, it's an Add to Cart but, it has multiple text inputs and a dropdown selection with different prices.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->


</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Combination Examples

<br><br>

Demonstrates How to Code Multiple Text Input Boxes and Quantity Input.


<br><br>
<hr align="left" width="50%" noshade>
<br><br>

<!-- START CONTENTS -->

<!-- START BUTTON EXAMPLES -->

Widget - Choose from 3 Options - $3.00 shipping

<br><br>
<!-- Start of Form -->
<!-- Start of Add to Cart Form -->
<!-- Note: target="paypal" was replaced with target="_self" -->
<!-- Note: shopping_url also added to code -->
<!-- These two changes allow better functionality with IE and Firefox --> 
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable. -->
<input type="hidden" name="cpp_header_image" value="https://yourwebsite.com/logo.jpg"> 
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<!-- Replace "business" value with your PayPal Email Address or your Merchant Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name" value="Widget">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="2">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Shop.html">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">

<!-- Note: shipping override variable is used with this example -->
<input type="hidden" name="shipping" value="3.00">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">


<input type="hidden" name="on0" value="Option Choice">Please Choose your Option:&nbsp;&nbsp;
<SELECT name="os0">
<OPTION value="Option A" selected>Option A - $10.00</OPTION>
<OPTION value="Option B">Option B - $20.00</OPTION>
<OPTION value="Option C">Option C - $30.00</OPTION>
</SELECT>
<br><br>

<!--  -->
<!-- option_index value=0 is associated with variable on0 -->
<!-- option_index value=1 is associated with variable on1 -->
<input type="hidden" name="option_index" value="0">
<!--  -->
<input type="hidden" name="option_select0" value="Option A">
<input type="hidden" name="option_amount0" value="10.00">
<input type="hidden" name="option_item_number0" value="W-1001-A">
<!--  -->
<input type="hidden" name="option_select1" value="Option B">
<input type="hidden" name="option_amount1" value="20.00">
<input type="hidden" name="option_item_number1" value="W-1001-B">
<!--  -->
<input type="hidden" name="option_select2" value="Option C">
<input type="hidden" name="option_amount2" value="30.00">
<input type="hidden" name="option_item_number2" value="W-1001-C">
<!--  -->

Enter Quantity:&#160;&#160;
<input type="text" name="quantity" size="1">
<br><br>

Text Input 1:&nbsp;&nbsp;
<input type="hidden" name="on1" value="Text 1">
<input type="text" name="os1" size="20">
<br><br>
Text Input 2:&nbsp;&nbsp;
<input type="hidden" name="on2" value="Text 2">
<input type="text" name="os2" size="20">
<br><br>
Text Input 3:&nbsp;&nbsp;
<input type="hidden" name="on3" value="Text 3">
<input type="text" name="os3" size="20">
<br><br>
Text Input 4:&nbsp;&nbsp;
<input type="hidden" name="on4" value="Text 4">
<input type="text" name="os4" size="20">
<br><br>
Text Input 5:&nbsp;&nbsp;
<input type="hidden" name="on5" value="Text 5">
<input type="text" name="os5" size="20">
<br><br>
Text Input 6:&nbsp;&nbsp;
<input type="hidden" name="on6" value="Text 6">
<input type="text" name="os6" size="20">
<br><br>
Text Input 7:&nbsp;&nbsp;
<input type="hidden" name="on7" value="Text 7">
<input type="text" name="os7" size="20">
<br><br>
Text Input 8:&nbsp;&nbsp;
<input type="hidden" name="on8" value="Text 8">
<input type="text" name="os8" size="20">
<br><br>
Text Input 9:&nbsp;&nbsp;
<input type="hidden" name="on9" value="Text 9">
<input type="text" name="os9" size="20">
<br><br>
<!-- -->
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<!-- End of Form -->



<!--  Start of View Cart Button Code  -->
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable. -->
<input type="hidden" name="cpp_header_image" value="https://yourwebsite.com/logo.jpg"> 
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="display" value="1">
<!-- Replace "business" value with your PayPal Email Address or your Merchant Account ID -->
<input type="hidden" name="business" value="your email address">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Shop.html">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> 
<!-- End of View Cart Form -->


<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br>


<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>
In order to test the code, you must replace the &quot;business&quot; value variable with your PayPal Email Address or your Merchant Account ID.


</body>
</html>

 

 

 

Login to Me Too
Solved

LutonAC
Contributor
Contributor

Thanks for the info will definitely be giving this a go.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.