Link to home
Start Free TrialLog in
Avatar of Melody Scott
Melody ScottFlag for United States of America

asked on

Need help with form input

Hi,

On this web page:

http://test dot magickitchen dot com slash menu slash MKMeals slash MKMP14 dot html

I have a form. I'm trying to adapt it from the code I've pasted here that usually adds an item to the cart. But I want the checkboxes to allow me to add more than one item to the cart. No more than two, though. Is that possible? I can't access the back end, that's written by our developer, I'm trying to get around that.
<tr class="Body"> 
              <form method="post"  action="/cgi/cart.cgi">
                <input type="hidden" name="cmd" value="add" />
                <input type="hidden" name="sku" value="17113" />
                  <td width="94" class="ItemTitle">7 Servings </td>
                  <td width="62" align="right" class="ItemTitle">$65.00</td>
                  <td width="62" align="right"><input name="qty" size="2" maxlength="6" value="1" type="text"></td>
                  <td width="108" align="center"><input type='image'  name="submit" border="0" src="/img/mkitchen/add_cart-2.gif"></td>
              </form>  
                </tr>

Open in new window

Avatar of sunithnair
sunithnair

What is the ned to check box? You have a textbox to specify the number of items to add right (Line 7). We can restrict that to have a value of max 2. Is thsi what you want?
Avatar of Melody Scott

ASKER

I want the customer to be able to select meal pack one and meal pack three, OR Meal pack four and Meal Pack five, etc. I want them to be able to select any two they would like, and have those two meal packs go to the cart.
But then again it depends on how your cart.cgi has been coded. We can change the html but it might not work properly because cart.cgi had not been coded to take care of this situation
I understand- this is a test site, so let's try it and see if it works, ok?
How many meal packs do you have on the site?
Do you have any idea why the following hidden fields are used for?

<input type="hidden" name="cmd" value="add" />
<input type="hidden" name="sku" value="17113" />
I have sic meal packs, and the hidden fields are to add an item to the cart and the SKU of the pack.
What is sku and what does the id represent? I will in the meantime so the html page
A SKU is a retailers code for an item they are selling. In this case, 17113 is the SKU for Meal Plan one, 27113 is the SKU for Meal Plan two, etc.
ASKER CERTIFIED SOLUTION
Avatar of sunithnair
sunithnair

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks- you're right, it doesn't work because of cart.cgi, but you did give me the right answer. Thanks for your help!