Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can you put a form within a form?


grafiti4u

Recommended Posts

Here is my ecommerce page to create a new account:

 

http://www.bitebuster.com/catalog/create_account.php

 

When people fill out the form and hit Continue, nothing happens. It worked before I added an include file. The client wanted to take out a box that had a Newsletter Option, and add something instead ? the "Where did you hear about us" box. So I created a little html file, and set the php file to include it. The form looks great, but now the form won't submit. It just doesn't do anything.

 

If I take out the following line in the PHP code, where it specifies to get the include then the form will submit successfully:

 

<?php include(DIR_WS_INCLUDES . 'hearabout.htm'); ?>

 

So I am thinking my problem lied in the include file I created.

Could this be because I have added a form within a form? The little html file code I created looks like this:

 

<html>
<head>
<title>how did you hear?</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table border="0" width="415" align="center" cellspacing="1" cellpadding="2" class="infoBox" bgcolor="#ffffff">
         <tr class="infoBoxContents">
           <td><table border="0" cellspacing="2" cellpadding="2" bgcolor="#ffffff">
             <tr>
               <td colspan="2" class="main">How did you hear about BiteBuster?:</td>
             </tr>
             <tr>
               <td width="59" class="main"> </td>
               <td width="202" class="main"><form name="form1" method="post" action="">
                 <p>
   <input name="internet" type="checkbox" id="internet" value="internet">
 The Internet<br>
 <input name="tradejournal" type="checkbox" id="tradejournal" value="tradejournal">
 Trade Journal<br>
 <input name="seminar" type="checkbox" id="seminar" value="seminar"> 
 Educational Seminar<br>
 <input name="friend" type="checkbox" id="friend" value="friend">
 Friend<br>
 <input name="other" type="checkbox" id="other" value="other"> 
 Other (specify below) <br>
 <input name="SpecifyOther" type="text" id="SpecifyOther">
 <br>
                 </p>
               </form></td>
             </tr>

           </table>
</body>
</html>

 

I am assuming I have to do something in the line:

 

<form name="form1" method="post" action="">

 

I tried applying the action http://www.bitebuster.com/catalog/create_account.php (this is what the action is in the create_account form itself) , but that didn't work either.

 

This is the last leg of my cart - If you could help me out, I would really appreciate it!

 

Thanks so much!

 

Kristi

:blink:

Link to comment
Share on other sites

I know there are contributions for 'how did you hear about us' that are used during the checkout process. I'm not sure whether you could adapt one of them to use on create account instead, but it might be worth taking a look.

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

First of all, you shouldn't include a full html page like that, it's giving redundant <html> <head> <title> and <body> tags which are unnecesary. I'd remove everything from your included file there except the table and form. Then, I'd move the include line to either before the existing form, or after the existing form; or incorporate it into the existing form somehow, which would mean writing a catch for it on the next page to process it, and removing the <form...> tags from this included file altogether as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...