Jump to content

[SOLVED] Form with multiple submit buttons


davey_b_

Recommended Posts

I know this can be done, I'm just having one of those days where I can't seem to think about it... :shrug:

 

I have an add to cart form and want to include multiple 'quantity' buttons:

 

Add1 | Add2 | Add3 |... and so on.

 

I'd appreciate any help on this

 

I'm using Virtuemart as the engine for this and here is my form code. This one is set "add 15 to cart"

 

<form action="index.php" method="post" name="addtocart" id="addtocart_4a5f54948b17a" class="addtocart_form" onsubmit="handleAddToCart( this.id );return false;">

<input type="hidden" name="product_id" value="21" />
<input type="hidden" name="prod_id[]" value="21" />
    
    <label for="quantity21" class="quantity_box"> </label>
    
    <input type="hidden" id="quantity21" name="quantity[]" value="15" style="vertical-align: middle;"/>
	   
    <input type="submit" class="addtocart_button" value="Add 15 to Cart" title="Add to Cart" />

    <input type="hidden" name="flypage" value="shop.flypage.tpl" />
<input type="hidden" name="page" value="shop.cart" />
    <input type="hidden" name="manufacturer_id" value="1" />
    <input type="hidden" name="category_id" value="6" />
    <input type="hidden" name="func" value="cartAdd" />
    <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="Itemid" value="64" />
    <input type="hidden" name="set_price[]" value="" />
    <input type="hidden" name="adjust_price[]" value="" />
    <input type="hidden" name="master_product[]" value="" />
</form>

 

I

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.