Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Form Submit in Product Desc


Guest

Recommended Posts

Product with form

 

Does someone know why my site does this? Click the link above and fill out the form in the product description and then click submit and instead of sending the form it goes to the shopping cart. here is the coding for the form.

 

<form action="http://streetflossin.com/v-cgi/forms.cgi"
     enctype="application/x-www-form-urlencoded"
     method="post">
<table>  <tr>
   <th align="right">
     Your Name:
   </th>
   <td>
     <input type="text" name="Your_Name"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Your Email:
   </th>
   <td>
     <input type="text" name="Your_Email"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Year:
   </th>
   <td>
     <input type="text" name="Year"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Make:
   </th>
   <td>
     <input type="text" name="Make"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Model:
   </th>
   <td>
     <input type="text" name="Model"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Doors:
   </th>
   <td>
     <select name="Doors" size="1">
       <option value="Two">Two</option>
       <option value="Three">Three</option>
       <option value="Four">Four</option>
       <option value="Five">Five</option>
     </select>
   </td>
 </tr>
 <tr>
   <th align="right">
     Headrest:
   </th>
   <td>
     <input type="radio" name="Headrest" value="Solid" checked="checked" class="checkbox" />Solid
     <input type="radio" name="Headrest" value="Donut" class="checkbox" />Donut
   </td>
 </tr>
 <tr>
   <th align="right">
     Replace Leather:
   </th>
   <td>
     <input type="radio" name="Replace_Leather" value="Yes" checked="checked" class="checkbox" />Yes
     <input type="radio" name="Replace_Leather" value="No" class="checkbox" />No
   </td>
 </tr>
 <tr>
   <th align="right">
     Airbag:
   </th>
   <td>
     <input type="radio" name="Airbag" value="Yes" checked="checked" class="checkbox" />Yes
     <input type="radio" name="Airbag" value="No" class="checkbox" />No
   </td>
 </tr>
 <tr>
   <th align="right">
     Color Select 1:
   </th>
   <td>
     <input type="text" name="Color_Select_1"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Color Select 2:
   </th>
   <td>
     <input type="text" name="Color_Select_2"  size="30" />
   </td>
 </tr>
 <tr>
   <th align="right">
     Style Select:
   </th>
   <td>
     <select name="Style_Select" size="1">
       <option value="Insert">Insert</option>
       <option value="Center">Center</option>
       <option value="Facing">Facing</option>
       <option value="Combo">Combo</option>
       <option value="Solid">Solid</option>
     </select>
   </td>
 </tr>
 <tr>
   <th></th>
   <td>
    <input type="submit" name="Form_Leather_Submit" value="Submit Form" />
   </td>
 </tr>
</table><input type="hidden" name="_vDeckformid" value="903" />
</form>

Link to comment
Share on other sites

Hi,

 

You have 5 forms defined, and because you have not seperated the form (name = 'cart_quantity' ) before the one you are having problems with, by adding a simple:

 

</form>

 

...., then the code still thinks that any 'submit/post' will off course run the following, because it is for the preceeding from:

 

<td width="100%" valign="top"><form name="cart_quantity" action="http://www.streetflossin.com/catalog/product_info.php?products_id=387&action=add_product&osCsid=" method="post"><input type="hidden" name="osCsid"

 

Simply add the 'close FORM tag' before your new form like this .......

 

</form>
<form action="http://streetflossin.com/v-cgi/forms.cgi"
    enctype="application/x-www-form-urlencoded"
    method="post">

 

Peter

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...